# cd /etc
# rm localtime //delete the existing localtime file
Check the available time zones in US
# ls /usr/share/zoneinfo/US/
Alaska Arizona Eastern Hawaii Michigan Pacific
Aleutian Central East-Indiana Indiana-Starke Mountain Samoa
Note: For other country timezones, browse the /usr/share/zoneinfo directory
Now we can change the time zone using below step
# vi /etc/timezone
America/Los_Angeles
then export the TZ variable
$ export TZ=America/Los_Angeles
$ date
Using below interactive method also we can change the Time zone
Ubuntu: dpkg-reconfigure tzdata
Redhat: redhat-config-date
CentOS/Fedora: system-config-date
FreeBSD/Slackware: tzselect
# ln -sf /usr/share/zoneinfo/Asia/Calcutta localtime
Now check the time
#date
# date
Mon Aug 17 23:10:14 IST 2013
But if you are doing any patching then after patching this Time zone will get changed. So this method is not perfect one.
Recent Comments