2007-09-30

New Zealand Daylight Savings Time changes

From 2007, daylight savings time in New Zealand starts one week earlier and finishes two weeks later. My Gentoo system still had the old timezone information, and so wasn't going to switch over on Sunday September 30 as it should:

$ zdump -v /etc/localtime | grep 2007
/etc/localtime  Sat Mar 17 13:59:59 2007 UTC = Sun Mar 18 02:59:59 2007 NZDT isdst=1
/etc/localtime  Sat Mar 17 14:00:00 2007 UTC = Sun Mar 18 02:00:00 2007 NZST isdst=0
/etc/localtime  Sat Oct  6 13:59:59 2007 UTC = Sun Oct  7 01:59:59 2007 NZST isdst=0
/etc/localtime  Sat Oct  6 14:00:00 2007 UTC = Sun Oct  7 03:00:00 2007 NZDT isdst=1

Solution: update the timezone-data package:

$ emerge -av sys-libs/timezone-data

(Alternatively, download the timezone data source directly from ftp://elsie.nci.nih.gov/pub/tzdata2007g.tar.gz and compile using zic.)

And restart the Network Time Protocol server, for good measure:

$ /etc/init.d/ntpd stop
$ ntpd -qgx
$ /etc/init.d/ntpd start
$ # wait a few minutes, then check the time...
$ ntptime

Once NTP’s timekeeping has settled down, you might also want to set the hardware clock.

$ hwclock --systohc
$ hwclock --show

No comments: