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
can ntp cahnge timezone to the old one, if I
1) start ntpd
2) change timezone via ln -s /usr/share/zoneinfo/ /etc/localtime
@ Dime..
ntp will only sync time from the time server, ur time zone should remain same.