In this article we will tell you to change timezone linux command line. Location of the local time file
Linux looks at /etc/localtime to determine the current time of your machine. This can either be a symbolic link to the correct time zone or a direct copy of the time zone file.
Please use following commands for changing the timezone.
[root@ip-kapilk-pc kapil]# date Fri Jan 22 06:35:11 MST 2010 [root@ip-kapilk-pc kapil]# ln -sf /usr/share/zoneinfo/ Africa/ Cuba GMT0 Japan Poland Universal America/ EET GMT-0 Kwajalein Portugal US/ Antarctica/ Egypt GMT+0 Libya posix/ UTC Arctic/ Eire Greenwich MET posixrules WET Asia/ EST Hongkong Mexico/ PRC W-SU Atlantic/ EST5EDT HST Mideast/ PST8PDT zone.tab Australia/ Etc/ Iceland MST right/ Zulu Brazil/ Europe/ Indian/ MST7MDT ROC Canada/ Factory Iran Navajo ROK CET GB iso3166.tab NZ Singapore Chile/ GB-Eire Israel NZ-CHAT Turkey CST6CDT GMT Jamaica Pacific/ UCT [root@ip-kapilk-pc kapil]# ln -sf /usr/share/zoneinfo/EST /etc/localtime [root@ip-kapilk-pc kapil]# date Fri Jan 22 08:40:32 EST 2010 [root@ip-kapilk-pc kapil]#
Change TimeZone Using /etc/localtime File
For this example, assume that your current timezone is UTC as shown below. You would like to change this to Pacific Time.
# date Mon Sep 17 22:59:24 UTC 2010