[Sussex] BST to GMT - Fedora 3

Steve Dobson steve at dobson.org
Sat Oct 29 10:39:17 UTC 2005


Brendan

I'm not using Fedora, but it probably uses the same time zone code.

On Thu, Oct 27, 2005 at 12:00:01PM +0100, Brendan Whelan wrote:
> We have a system running on BST and have been asked what will happen
> at 0200 on Sunday when the UK changes to GMT for the winter.
> 
> Looking at the time settings, using webmin, the system timezone is
> set to "Europe/London (Great Britain)".
> 
> Will the time change automatically?

The short answer is that it will change automatically.  The long
answer is below.

You haven't told me your full configuration, so I'll say how I've
sent my systems up as and what happens there.

First I don't configure my local TZ environmental variable for my shells.
date(1) and other programs that use the standard C library functions
will report different times depending upon this variable.

With TZ not set you get the date and time configured by default.  This
sounds as if this is what you have.  It is possible to set each shell
to a different timezone my settings the TZ variable:

  $ echo $TZ
  
  $ date
  Sat Oct 29 10:59:32 BST 2005
  $ export TZ=GMT
  $ date
  Sat Oct 29 09:59:41 GMT 2005
  $ export TZ=EST  # Eastern Standard Time (A US timezone)
  $ date
  Sat Oct 29 05:06:56 EST 2005
  $

This is very useful to people remotely logging in from very remote sites
because they can then configure their shell to report time (like ls(1)
when it reports long listings [$ ls -l]) in their local time.

When I install my system in Debian I am asked if the real time clock is
running GMT.  You don't tell me if your system is a dedicated to Linux or
a duel boot.  As I have only used dedicated Linux system I always run my
system's real time clock in GMT at ALL TIMES.  I then let the system 
convert to the appropriate time zone.

There are a number of different timezone files stored in /usr/share/zoneinfo.
This tell the system the rules for converting from GMT, when to apply 
daylight saving, and how much to apply.  You can use the command zdump(1)
to report on the transitions to and from summer time:

  $ zdump -v GB | less

Here is part of the dump, the data for this year and next:

  GB  Sun Mar 27 00:59:59 2005 UTC = Sun Mar 27 00:59:59 2005 GMT isdst=0 gmtoff=0
  GB  Sun Mar 27 01:00:00 2005 UTC = Sun Mar 27 02:00:00 2005 BST isdst=1 gmtoff=3600
  GB  Sun Oct 30 00:59:59 2005 UTC = Sun Oct 30 01:59:59 2005 BST isdst=1 gmtoff=3600
  GB  Sun Oct 30 01:00:00 2005 UTC = Sun Oct 30 01:00:00 2005 GMT isdst=0 gmtoff=0
  GB  Sun Mar 26 00:59:59 2006 UTC = Sun Mar 26 00:59:59 2006 GMT isdst=0 gmtoff=0
  GB  Sun Mar 26 01:00:00 2006 UTC = Sun Mar 26 02:00:00 2006 BST isdst=1 gmtoff=3600
  GB  Sun Oct 29 00:59:59 2006 UTC = Sun Oct 29 01:59:59 2006 BST isdst=1 gmtoff=3600
  GB  Sun Oct 29 01:00:00 2006 UTC = Sun Oct 29 01:00:00 2006 GMT isdst=0 gmtoff=0

UTC (or Universal Time Clock) is almost, but not quite the same as GMT.
GMT is based upon the earth's spin and when the Sun is in a given place
in the sky over Greenwich Meridian.  However the Earth does not turn on
it's axis in a regular way now we can measure time very accurately with
atomic clocks.  UTC (Universal Time Clock) is the atomic reference.

Finally I should point out that if your machine is duel boot then I
believe that Windows runs the real time clock in the local timezone.
I also assume that Windows will automatically adjust that time clock
at 2am or when it is first booted after a timezone change.  If that
is the case Linux's time reporting libraries are going to have cope,
but as I have never used such a system I can't say what happens.

> What happens to cron jobs which are running, say, every minute?

Than man page on cron as the following to say:

  Special  considerations exist when the clock is changed by less
  than 3 hours, for example at the beginning and end of daylight savings
  time. If the time has moved forwards, those jobs which would have run
  in the time that was skipped will be run soon after the change.
  Conversely, if the time has moved backwards by less than 3 hours,
  those  jobs that fall into the repeated time will not be re-run.
			    `
> As an aside, is there an option to use GMT throughout the year?

Configure your systems to a GMT timezone - There are a number 
of GMT time zones for use around the world.  You might find
GMT (or GMT+0) the one you want.  Or if you only want the cron
jobs to run in GMT:

  # Change the timezone for the cron jobs below
  TZ=GMT
  * * * * *  my-gmt-cron-job

Note that unless you configure the cron otherwise (in the 
/etc/init.d script for example) it will run in the local timezone.

Hope this helps.
Steve
-- 
buzzword, n:
	The fly in the ointment of computer literacy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.lug.org.uk/pipermail/sussex/attachments/20051029/ff7595a6/attachment.pgp 


More information about the Sussex mailing list