Change TimeZone in your Linux Server quickly:

In any Red Hat based (RHEL/CentOS/Fedora) Server, change time zone to PST/PDT quickly:

# mv /etc/localtime /etc/localtime.old && ln -s /usr/share/zoneinfo/PST8PDT /etc/localtime

or set zone to IST:
# mv /etc/localtime /etc/localtime.old && ln -s /usr/share/zoneinfo/Calcutta /etc/localtime

or Set the TZ environment variable for quick display time according to preferred Time Zone:
# export TZ=America/Los_Angeles
and then view the output of date command.

or If you have the utility rdate, update the current system time by executing
# rdate -s pool.ntp.org

or You can execute ‘system-config-date’ for setting up date/time and time zone:
# system-config-date

or better install ntp to sync date/time automatically from time server:
# yum install ntp
# chkconfig ntpd on
# ntpdate pool.ntp.org
# /etc/init.d/ntpd start

If you’re using Ubuntu, tzconfig is there for you:
# tzconfig

3 Responses to “Change TimeZone in your Linux Server quickly:”

  1. can ntp cahnge timezone to the old one, if I
    1) start ntpd
    2) change timezone via ln -s /usr/share/zoneinfo/ /etc/localtime

  2. @ Dime..
    ntp will only sync time from the time server, ur time zone should remain same.

  3. hi…i found your website through search engine, thanks for information about Change Time Zone in your Linux Server quickly…its really nic

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.