time change - a warning
John Abreau
jabr at blu.org
Fri Sep 20 21:40:20 EDT 2002
Seth Gordon <seth at genome.wi.mit.edu> writes:
> Warning: when Daylight Savings Time ends, if you set your computer's
> clock back using Linux, the time on Linux may start acting strangely.
Ick! Why would anyone want to much with daylight savings time manually?
The basis of the Unix clock is merely the number of seconds since the
epoch, and the concept of Daylight Savings Time is supposed to be a higher
level concept implemented in the functions that print the time in various
formats. If you muck with the system clock to track daylight savings,
you're just asking for trouble.
Linux behaves in the proper Unix manner when you set the hardware clock
to UTC and define your local timezone. In effect, with Daylight Savings
you actually have two completely separate timezones, and date(1) and
strftime(3) do the Right Thing based on which is active for a particular
clock value.
The two time zones (here on the East Coast) are EST (Eastern Standard
Time)
and EDT (Eastern Daylight Time). On any particular day, for instance,
7:00 pm EST == 8:00 pm EDT. The only real difference is, we switch which
one we're using twice a year, so for any given second, one of them is in
use
and the other only exists in a theoretical sense.
So the date(1) command shows for the following clock values:
1018162799 => Sun Apr 7 01:59:59 EST 2002
1018162800 => Sun Apr 7 03:00:00 EDT 2002
:
:
1035698399 => Sun Oct 27 01:59:59 EDT 2002
1035698400 => Sun Oct 27 01:00:00 EST 2002
:
1035702000 => Sun Oct 27 02:00:00 EST 2002
The commands I used to determine this were of the forms
date -d '2002-10-27 06:00:00 UTC'
and
date -d '2002-10-27 06:00:00 UTC +%s'
--
John Abreau / Executive Director, Boston Linux & Unix
IM: jabr at jabber.blu.org / abreauj at aim / abreauj at yahoo / 28611923 at icq
Email jabr at blu.org / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99
Some people say, "The enemy of my enemy is my friend."
I often respond, "When elephants fight, it's the grass
that gets trampled."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 344 bytes
Desc: not available
URL: <http://lists.blu.org/pipermail/discuss/attachments/20020920/7c6fd675/attachment.sig>
More information about the Discuss
mailing list