In 2 months (March 11, 2007), the new US Daylight Savings Time goes into effect. Normally this would happen on April 1. Read on to find out how you can tell if your systems are going to be an hour off for almost a month or not.
First off, this only impacts people who are using US timezones (either directly, by setting the system time, or by having a user on the system manually set the "TZ" environment variable). Recently distributions or distributions with recently patches (particularly of the libc packages) should have no problem.
How do you tell for sure? Run the following command and if you get the output here you should be safe:
 guin:~# zdump -v /etc/localtime | grep 2007 /etc/localtime Sun Mar 11 08:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 MST isdst=0 gmtoff=-25200 /etc/localtime Sun Mar 11 09:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 MDT isdst=1 gmtoff=-21600 /etc/localtime Sun Nov 4 07:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 MDT isdst=1 gmtoff=-21600 /etc/localtime Sun Nov 4 08:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 MST isdst=0 gmtoff=-25200  guin:~#
However, if you get the following your time will be off on March 11:
root@woody:~$ zdump -v /etc/localtime | grep 2007 /etc/localtime Sun Apr 1 07:59:59 2007 UTC = Sun Apr 1 01:59:59 2007 CST isdst=0 gmtoff=-21600 /etc/localtime Sun Apr 1 08:00:00 2007 UTC = Sun Apr 1 03:00:00 2007 CDT isdst=1 gmtoff=-18000 /etc/localtime Sun Oct 28 06:59:59 2007 UTC = Sun Oct 28 01:59:59 2007 CDT isdst=1 gmtoff=-18000 /etc/localtime Sun Oct 28 07:00:00 2007 UTC = Sun Oct 28 01:00:00 2007 CST isdst=0 gmtoff=-21600 root@woody:~$
I hear you asking: I run ntp, won't that keep my time correct? No. NTP syncs the kernel clock, which is in UTC with no daylight savings in effect. When you ask the system what the local time is, this gets converted from UTC to local time via the timezone information databases (which we dump above). The NTP daemon will sync your time, but the local representation of it will still be off.
This is how Unix prevents from getting into an infinite loop, setting the clock back to 1:00:00am after 01:59:59am. The UTC clock always increments, even when localtime jumps backwards an hour.
So, this is how you tell on your production servers whether there will be problems or not.comments powered by Disqus