Daylight savings time.

Adam Myrow amyrow at midsouth.rr.com
Sat Apr 5 14:38:44 EST 2003


As explained in the clock Mini-howto, Linux doesn't care what time is in
the computer once it's going.  The only dealings with the hardware clock
are at startup, when it sets its time from the hardware clock and at
shutdown, when it writes the current time back to the hardware clock.
That's why when you install Linux, it asks not only what timezone you are
in, but whether your hardware clock is set to Universal time or local
time.  If the clock is set to local time, the hwclock command checks your
timezone and adds the right number of hours to get UTC, and assumes your
clock is right.  So, if you have your PC shut down during the DST switch,
and it doesn't do the change itself, your clock will be off by one hour.
If the PC was on during the switch, Linux converts since it just runs in
UTC internally and knows that DST came so it will show the right time.  At
shutdown or reboot, the correct time gets written back to the hardware
clock so it will once again, be in sync.  If you set your hardware clock
to UTC, the computer shouldn't attempt to adjust for DST since UTC doesn't
have it.  If your computer is turned off in that case, it makes no
difference.  As long as the clock reads correctly in terms of UTC, Linux
will come up with the right local time.

As I said, this comes from the Clock Mini-howto, and it really does a good
job of explaining how it works.  The whole issue comes up because Linux is
acting like all other Unix systems which always run in UTC and just
convert to get local time.  Of course, DOS and Windows want local time
because they don't do conversions.  They ask for your local timezone so
that they can put it in outgoing emails, and that's about it.  BTW, if you
have a dual boot system, and Windows is set to automatically adjust for
daylight savings time, you should either turn that off in Windows and
leave the computer on, or leave it on in Windows and leave the computer
off.  The Clock Mini-howto states that a Linux-only computer should keep
its clock in UTC, and it makes sense with this explanation.  Hope this
helps.





More information about the Speakup mailing list