Sunday, November 30, 2008

How to change Redhat Linux timezone

Our dedicated server is in CST timezone, so we thought of changing the timezone to PST, where we are. Here are the instructions I followed:

#timeconfig

This is a visual way of setting the timezone, but I am not sure if it actually did anything.


So, I tried manual way by following these steps:
#mv /etc/localtime /etc/localtime-old
#ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime
#rdate -s time.nist.gov

Because of our server firewall, the above step timedout. So I tried the following, which timed out too:
#ntpdate pool.ntp.org

So I set the time manually, and then synced the hardware clock:
#date -s "3:38"
#hwclock --systohc --utc
#hwclock --show

No comments: