Daylight savings and timezones
February 5, 2008 Solaris Admin No CommentsWith the change in daylight savings rapidly approaching and most administrators are very busy installing the latest timezone patch i thought it was a good a time as any to take a closer look at timezones.
First up here are the required patches:
Solaris 8: 109809-08
Solaris 9: 113225-10
Solaris 10: 125378-03
So, if you are unsure of your Solaris release you are definitely on the wrong site.
I have pre-patched the current timezone patch;
anouk:/ # showrev -p | grep 125378
Patch: 125378-02 Obsoletes: 122032-05 Requires: Incompatibles: Packages: SUNWcsu
Patch: 125378-03 Obsoletes: 122032-05 Requires: Incompatibles: Packages: SUNWcsu
Let’s just confirm the timezone;
anouk:/ # cat /etc/TIMEZONE
…<snip>
TZ=Australia/Victoria
…<snip>
Now, the files in /usr/share/lib/zoneinfo are unreadable without the zdump command. Using the -v for verbose option we can see all the timezone changes for your relevant region from 1901 to 2038. For now, let’s just see what is in store for 2008.
anouk:/ # zdump -v Australia/Victoria | grep 2008
Australia/Victoria Tue Feb 5 01:03:14 2008 UTC = Tue Feb 5 12:03:14 2008 EST isdst=1
Australia/Victoria Sat Apr 5 15:59:59 2008 UTC = Sun Apr 6 02:59:59 2008 EST isdst=1
Australia/Victoria Sat Apr 5 16:00:00 2008 UTC = Sun Apr 6 02:00:00 2008 EST isdst=0
Australia/Victoria Sat Oct 4 15:59:59 2008 UTC = Sun Oct 5 01:59:59 2008 EST isdst=0
Australia/Victoria Sat Oct 4 16:00:00 2008 UTC = Sun Oct 5 03:00:00 2008 EST isdst=1
The top line shows the current date and time. Lines 2 and 3 show the changes at the end of daylight savings and the bottom 2 lines the start again later in the year. If you do not install the patch the above output will look like this and who knows what it will break;
heineken:/export/home/mg133308/Desktop # zdump -v Australia/Victoria | grep 2008
Australia/Victoria Tue Feb 5 01:10:14 2008 UTC = Tue Feb 5 12:10:14 2008 EST isdst=1
Australia/Victoria Sat Mar 29 15:59:59 2008 UTC = Sun Mar 30 02:59:59 2008 EST isdst=1
Australia/Victoria Sat Mar 29 16:00:00 2008 UTC = Sun Mar 30 02:00:00 2008 EST isdst=0
Australia/Victoria Sat Oct 25 15:59:59 2008 UTC = Sun Oct 26 01:59:59 2008 EST isdst=0
Australia/Victoria Sat Oct 25 16:00:00 2008 UTC = Sun Oct 26 03:00:00 2008 EST isdst=1
So, if you haven’t already - get patching. You only have a few weeks left. Bear in mind this patch requires a reboot.