Test Your Linux Box for Daylight Savings Change

Is your linux box ready for the Daylight Savings Change?, test it with the following:

$ date –date=”Mar 25 15:00:00 UTC 2006”
$ date –date=”Mar 25 15:00:00 UTC 2007”

This post in slashdot explains: ”If the output of both shows the same time (eg. 10:00 EST) then you’ve got a problem. If they show different times (eg. 10:00 EST and 11:00 EDT) then your system is ok.”

In the case of my Centos 4.3 server it didn’t, but it wasn’t Centos’ fault, sometime ago I overwrote /etc/localtime with the one for my timezone. I fixed it by:

# rm -f /etc/localtime
# ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime

(replace America/Chicago with the zoneinfo file for your timezone)