In the beginning was the command line..


HOWTO: New Zealand Daylight Savings changes for GNU/Linux

, posted: 7-Aug-2007 15:45

OS Distribution vendors need time to test and release packages and updates. If, come late September and your OS still doesn't have a 'tzdata' update available you may have to perform the following steps on your GNU/Linux servers to bring the new Daylight Savings Time changes into effect. Debian stable unstable has the new tzdata but I don't know of any other distro which does, yet.

Step 1: Check.
to see when DST will be enabled by your current configuration, observe the output of "zdump -v /etc/localtime |grep 2007"
barf@maksimir:~$ 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 gmtoff=46800
/etc/localtime Sat Mar 17 14:00:00 2007 UTC = Sun Mar 18 02:00:00 2007 NZST isdst=0 gmtoff=43200
/etc/localtime Sat Oct 6 13:59:59 2007 UTC = Sun Oct 7 01:59:59 2007 NZST isdst=0 gmtoff=43200
/etc/localtime Sat Oct 6 14:00:00 2007 UTC = Sun Oct 7 03:00:00 2007 NZDT isdst=1 gmtoff=46800


isdst=1 is when daylight savings time will be enabled. this computer has not had the update.

Step 2: Fix.
cd to your favourite working directory
wget the updated tzdata "wget ftp://elsie.nci.nih.gov/pub/tzdata2007g.tar.gz"
make a directory "mkdir tzdata"
extract it "tar zxvf tzdata2007f.tar.gz -C tzdata/"
Now, su to root, or use sudo to use the 'zic' command ie "sudo -s", "su -" or "sudo zic "
cd to tzdata and run the following (as root)
root@maksimir:/tmp/tzdata# zic australasia
root@maksimir:/tmp/tzdata# zic backward
root@maksimir:/tmp/tzdata# zic -l `cat /etc/timezone`


Step 3: Review
Just as we did in Step 1, observe the DST configuration with "zdump -v /etc/localtime |grep 2007"
barf@maksimir:~$ 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 gmtoff=46800
/etc/localtime Sat Mar 17 14:00:00 2007 UTC = Sun Mar 18 02:00:00 2007 NZST isdst=0 gmtoff=43200
/etc/localtime Sat Sep 29 13:59:59 2007 UTC = Sun Sep 30 01:59:59 2007 NZST isdst=0 gmtoff=43200
/etc/localtime Sat Sep 29 14:00:00 2007 UTC = Sun Sep 30 03:00:00 2007 NZDT isdst=1 gmtoff=46800





Other related posts:
Sound the alarm: ACTA negotiations delayed
I'm not protesting S92a
watch Al Jazeera on XBMC






Comment by sbiddle, on 7-Aug-2007 16:55

Late October? Don't you mean late September since the changeover is Sept 30?


Author's note by barf, on 7-Aug-2007 17:05

my bad. thanks, fixed that.


Author's note by barf, on 4-Sep-2007 00:19

UPDATE: i changed the URL for tzdata to reflect the latest 'g' suffix instead of 'f'


Comment by vex, on 21-Sep-2007 16:15

nice howto barf ;)


Author's note by barf, on 30-Sep-2007 13:08

update works on VMware ESX servers too, FYI


Comment by matt, on 2-Oct-2007 09:51

does this also fix the extended period daylight savings will run into? E.g. to 06Apr07 not 17Mar07 ?
barf: yes!


Comment by Matt Riddell, on 2-Oct-2007 11:03

Hi,



The URL is now h instead of g


Add a comment

Please note: comments that are inappropriate or promotional in nature will be deleted. E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.

Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and placed in the moderation queue for the blog owner's approval.

Your name:

Your e-mail:

Your webpage:

barf's profile

Stuart MacIntosh
Clarkville
New Zealand


Hello world.