Skip to content

DST – make sure /etc/localtime is current

Curious – I found that on an FC2 box while the timezone files had been updated last March (kicking the general preparedness out of everything else on the planet) the /etc/localtime file existed as an old copy of the timezone file. Oops. I’m pretty sure that wasn’t done manually.

Back in the day /etc/localtime used to always be a symlink to a zonefile. This seem[d,s] like a good idea – does anybody know why Fedora might have gotten away from that model (Redhat confirms)? I reinstated it and everything appears to be OK.

>zdump -v EDT5EST | grep 2007
EDT5EST  Sun Mar 11 06:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 EDT isdst=0 gmtoff=-18000
EDT5EST  Sun Mar 11 07:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 EST isdst=1 gmtoff=-14400
EDT5EST  Sun Nov  4 05:59:59 2007 UTC = Sun Nov  4 01:59:59 2007 EST isdst=1 gmtoff=-14400
EDT5EST  Sun Nov  4 06:00:00 2007 UTC = Sun Nov  4 01:00:00 2007 EDT isdst=0 gmtoff=-18000

>ls -l /usr/share/zoneinfo/EST5EDT
-rw-r--r--  1 root root 837 Mar 21  2006 /usr/share/zoneinfo/EST5EDT

>uptime
16:13:27 up 265 days,  7:47,  1 user,  load average: 0.66, 0.60, 0.48

>ls -l /etc/localtime
-rw-r--r--  1 root root 1267 Aug 31  2005 /etc/localtime

#mv /etc/localtime /etc/localtime-old; ln -s /usr/share/zoneinfo/EST5EDT /etc/localtime

#date
Mon Mar 12 17:16:35 EDT 2007

#ntpdate us.pool.ntp.org
Looking for host us.pool.ntp.org and service ntp
host found : enigma.wiredgoats.com
12 Mar 16:17:40 ntpdate[6552]: step time server 208.201.242.2 offset -3549.652149 sec

(the time had been hand-corrected as an interim workaround)