Upgrading Linux Daylight Saving Time (timezone)

Linux uses a special mechanism called DST (Daylight Saving Time) that is used by linux to update the time of the operating system when the clock has to change for daylight saving. The daylight saving, of course, is different for every location and country.

In 2005, the congress of United States changed its daylight saving, but at that time, Redhat 7.3 already existed and its daylight saving files where deprecated. Newer versions of Linux have their DST files updated but in United States, this year the time changes, and if there are RH 7.3, they will change the incorrect day.

Check if you have the new timezones:

$ zdump -v /etc/localtime | grep 2007

The file /etc/localtime is a link to the corresponding timezone for the country the computer is in, the files of timezones are in /usr/share/zoneinfo/
For example, California’s file is in /usr/share/zoneinfo/US/Pacific You could do:

$ zdump -v /usr/share/zoneinfo/US/Pacific | grep 2007
If the output says:
/usr/share/zoneinfo/US/Pacific Sun Mar 11 09:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 PST isdst=0 gmtoff=-28800
/usr/share/zoneinfo/US/Pacific Sun Mar 11 10:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 PDT isdst=1 gmtoff=-25200
/usr/share/zoneinfo/US/Pacific Sun Nov 4 08:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 PDT isdst=1 gmtoff=-25200
/usr/share/zoneinfo/US/Pacific Sun Nov 4 09:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 PST isdst=0 gmtoff=-28800

All is OK, if not, you have to upgrade Zoneinfo Files.

So it is required, in some “old” linux distributions, to upgrade the timezone files, steps are following:
1) Get the new timezone tzdata2007c.tar.gz copy it to some directory.
wget ftp://elsie.nci.nih.gov/pub/tzdata2007k.tar.gz

2) tar zvxf tzdata2007k.tar.gz
3) zic -d zoneinfo northamerica
4) cd zoneinfo
5) cp -r * /usr/share/zoneinfo
Now try again:
zdump -v /etc/localtime | grep 2007