Changing daylight savings time in Linux
Here's how to fix your timezone files in Linux in case some politician with nothing better to do changes the dates for daylight savings time (DST). You can't just reset your clock, because it will mess up other computers that get their time from you.
- Download timezone files from
This consists of two files:
Put them in their own directory, because when they're extracted they don't create a directory of their own.
- Untar the files and make them read-write.
tar -xzvf tzcode2007c.tar.gz tar -xzvf tzdata2007c.tar.gz chmod a+rw *
- Edit Makefile and change the install directory ("TOPDIR") to /usr/share
- Compile and install
make make install
- Set the timezone (in this case, to Eastern Standard Time)
zic -l /usr/share/etc/ zoneinfo/America/New_York
zic -d zoneinfo northamerica cd zoneinfo cp -r * /usr/share/zoneinfo/
- Reset your clock if necessary (using 'date' or '/usr/sbin/netdate').
- Mark down on your calendar to vote the guy that changed the date out of office.
- Check the dates that your system uses for DST by examining
zdump -v /etc/localtime
- New timezone files can be created in a text editor and then converted to the proper format with zic. See man zic for details.