Prepare your Linux box for Daylight Saving Time (summer or winter time)

The summertime is starting soon. What can you do on your Linux machine to be prepared for Daylight Saving Time?

The bad news

Time is a very complicated matter; it shifts every half year, there are leap years and seconds, some countries change the start or end date of summertime, many countries have multiple timezones, some servers can be in one zone while the users can be in a different zone, and so on.
All the timezone information is stored in /usr/share/zoneinfo. The directories and files in there are definitions of what the displayed time should be. The displayed time is based on Coordinated Universal Time (UTC) adjusted to the rules listed in a timezone file in /usr/share/zoneinfo.
To modify the timezone for your computer; copy a timezone file to /etc/localtime. For example to set the timezone to Europe/Amsterdam:

# cp /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime

Chances are that your distribution has a tool available to help you. Use it; it's likely easier. Fedora uses a tool called system-config-time to manage time and timezones.

The good news

Most likely your Linux box is already prepared for DST. Above all that, Network Time Protocol (NTP) is so extremely easy to use, that syncing your time is no problem at all. To be prepared for DST, use NTP and update all packages on your Fedora machine like this:

# yum update
# yum install ntp
# service ntpd start
# chkconfig ntpd on

For any other distribution; update you system, install ntp and start it.

About Consultancy Articles Contact




References Red Hat Certified Architect By Robert de Bock Robert de Bock
Curriculum Vitae By Fred Clausen +31 6 14 39 58 72
By Nelson Manning robert@meinit.nl