[nSLUG] DST & tzdata

George N. White III gnwiii at gmail.com
Sun Mar 4 14:20:46 AST 2007


On 3/4/07, Mike <mspencer at tallships.ca> wrote:

> Slackware seems not to have a patch or equivalent for the new DST
> rules that GloboCop has ordered.  We're apparently being sucked
> into the propwash.
>
> So I fetched the tzdata files from:
>
>    ftp://elsie.nci.nih.gov/pub/tzcode2007c.tar.gz
>
> dated Mon Feb 26. Therein I note that the rules for America/Halifax
> haven't been updated to the new dates and there is no Zone... line for
> AST/ADT.  I think I understand from inference and the  zic(8) manpage
> how to fix things up but...

The files are tricky to read.  Look for the lines:

Rule    Canada  2007    max     -       Mar     Sun>=8  2:00    1:00    D
Rule    Canada  2007    max     -       Nov     Sun>=1  2:00    0       S

and note that America/Halifax is most recently (since 1974) set to
Canada.  After you have installed the files,

$ zdump -v America/Halifax | grep 2007
America/Halifax  Sun Mar 11 05:59:59 2007 UTC = Sun Mar 11 01:59:59
2007 AST isdst=0 gmtoff=-14400
America/Halifax  Sun Mar 11 06:00:00 2007 UTC = Sun Mar 11 03:00:00
2007 ADT isdst=1 gmtoff=-10800
America/Halifax  Sun Nov  4 04:59:59 2007 UTC = Sun Nov  4 01:59:59
2007 ADT isdst=1 gmtoff=-10800
America/Halifax  Sun Nov  4 05:00:00 2007 UTC = Sun Nov  4 01:00:00
2007 AST isdst=0 gmtoff=-14400

> Before I do that, does anybody know of any gotchas?  Is there an
> authoritative Canadian site that has updated tzdata files for Canadian
> zones?
>
> More technical yet: Is there any reason why I can't compile just the
> zoneinfo file for America/Halifax and put the binary into the
> canonical zoneinfo directory without doing the other zone files?  My
> own machine isn't a server and never moves out of the AST/ADT
> zone. Does anything important regularly use the zoneinfo files for
> *non-local* zones?  F'rgzample, if I get ntp running using a server in
> Boston or Ontario, will ntp reference my local zoneinfo files for for
> EST/ADT?

Do you keep your hardware clock (the one that runs from battery while
the system is off) on UTC?  ntp should not touch the tzdata stuff --
normally it is only concerned with UTC, but if you keep the hardware
clock on localtime (e.g., in order to dual boot Windows), tzdata would
be used to translate to/from UTC when booting and shutting down to
read/set the hardware clock.

-- 
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

!DSPAM:45eb0e02232281983286158!




More information about the nSLUG mailing list