Sunday, January 11, 2015

Change TimeZone in Linux

Login to the Server through SSH :


root@techyfix ~]#

Edit the Clock file located at described path


root@techyfix ~]#  vi /etc/sysconfig/clock
# change to your location

ZONE="
Asia/Kolkata
"
Save the File after changing the Zone.

[root@techyfix ~]# source /etc/sysconfig/clock
# reload

copy your timezone file under the "/usr/share/zoneinfo" like follows:

[root@techyfix ~]# cp -p /usr/share/zoneinfo/Asia/Kolkata  /etc/localtime

It will ask to overwrite the file "localtime", confirm by typing Y

cp: overwrite `/etc/localtime'?
y

Now, Your Server TimeZone has been Reset as needed.

No comments:

Post a Comment