Timezones and DLS

Just got asked a question about when a country makes a change to it's Day Light Times.

So this year Samoa is going to have daylight saving for the first time.

For linux there is managed in NTP via what ever tzdata file tou have installed. My system (Centos 5.5) currently has this:

rpm -qa|grep tzdata
tzdata-2010k-1.el5
tzdata-java-2010k-1.el5

2010k dates to about a release some time in August (it is today September 16th 2010).

If I examine this file:

zdump -v /usr/share/zoneinfo/Pacific/Auckland | grep 2010
/usr/share/zoneinfo/Pacific/Auckland  Sat Apr  3 13:59:59 2010 UTC = Sun Apr  4 02:59:59 2010 NZDT isdst=1 gmtoff=46800
/usr/share/zoneinfo/Pacific/Auckland  Sat Apr  3 14:00:00 2010 UTC = Sun Apr  4 02:00:00 2010 NZST isdst=0 gmtoff=43200
/usr/share/zoneinfo/Pacific/Auckland  Sat Sep 25 13:59:59 2010 UTC = Sun Sep 26 01:59:59 2010 NZST isdst=0 gmtoff=43200
/usr/share/zoneinfo/Pacific/Auckland  Sat Sep 25 14:00:00 2010 UTC = Sun Sep 26 03:00:00 2010 NZDT isdst=1 gmtoff=46800

I see that I get the right information for my timezone for daylight saving this year, due to start in about 2 weeks.
I would get the same information above if I had done:

zdump -v /etc/localtime | grep 2010

Which gives me for my local time zone which is of course Auckland!

Now lets examine Apia in Samoa

zdump -v /usr/share/zoneinfo/Pacific/Apia | grep 2010
/usr/share/zoneinfo/Pacific/Apia  Sun Sep 26 10:59:59 2010 UTC = Sat Sep 25 23:59:59 2010 WST isdst=0 gmtoff=-39600
/usr/share/zoneinfo/Pacific/Apia  Sun Sep 26 11:00:00 2010 UTC = Sun Sep 26 01:00:00 2010 WSDT isdst=1 gmtoff=-36000

So this is good! It says daylight saving will start at midnight the end of the 25th September.

zdump -v /usr/share/zoneinfo/Pacific/Apia | grep 2011
/usr/share/zoneinfo/Pacific/Apia  Sun Apr  3 09:59:59 2011 UTC = Sat Apr  2 23:59:59 2011 WSDT isdst=1 gmtoff=-36000
/usr/share/zoneinfo/Pacific/Apia  Sun Apr  3 10:00:00 2011 UTC = Sat Apr  2 23:00:00 2011 WST isdst=0 gmtoff=-39600

And this tells us that it will finish April 2nd.
I also did an upgrade to bring my system up to using 2010l, which was released 13th September.