[NTLUG:Discuss] Slightly OT: Why would I care about Leap Seconds

Patrick R. Michaud pmichaud at pobox.com
Mon Feb 5 09:21:45 CST 2007


On Mon, Feb 05, 2007 at 06:04:35AM +0000, Leroy Tennison wrote:
> Back to "reality", I would be much more concerned about the coming 
> daylight savings time change where by law its beginning and end was 
> moved by days and you could be out of synchronization with "real" time 
> by an hour for an extended period of time if you didn't take this into 
> account.  On this subject, the Microsoft and NetWare worlds have patches 
> to apply for this issue, what is the situation with Linux?

Most Linux distributions have likely already taken this into account,
as long as you've updated your system recently.

Usually it simply requires updated versions of the relevant
/usr/share/zoneinfo/* files for each timezone.  Often these are
in the "tzdata" or "timezone" packages for a distribution.  
The files in /usr/share/zoneinfo/* define the rules for
computing daylight savings time in various timezones.

The file that controls the system's default notion of daylight
savings time is /etc/localtime.  You can determine if your system
is up-to-date with respect to daylight savings time using the "zdump"
command.

    pmichaud at orange:~> sudo /usr/sbin/zdump -v /etc/localtime | grep 2007
    /etc/localtime  Sun Mar 11 07:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 CST isdst=0 gmtoff=-21600
    /etc/localtime  Sun Mar 11 08:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 CDT isdst=1 gmtoff=-18000
    /etc/localtime  Sun Nov  4 06:59:59 2007 UTC = Sun Nov  4 01:59:59 2007 CDT isdst=1 gmtoff=-18000
    /etc/localtime  Sun Nov  4 07:00:00 2007 UTC = Sun Nov  4 01:00:00 2007 CST isdst=0 gmtoff=-21600

Here you can see that daylight savings time on my machine is set
to begin on March 11 and end on Nov 4.  If you run the above command
and see the dates "Apr  1" and "Oct 28" then your system is still
set to use the old daylight savings time rules in the U.S.

Pm



More information about the Discuss mailing list