Change Server Timezone in CentOS

It just happened that sometimes the server is using UTC time instead of our localtime.

[root@venus wiki]# date
Wed Oct 14 12:22:59 UTC 2015
[root@venus wiki]# cat /etc/localtime
TZif2UTCTZif2UTC
UTC0

Make a backup of the /etc/localtime

[root@venus wiki]# mv /etc/localtime /etc/localtime.bak

Symlink to our desired timezone. as a new /etc/localtime

[root@venus wiki]# ln -s /usr/share/zoneinfo/Asia/Ku
Kuala_Lumpur  Kuching       Kuwait
[root@venus wiki]# ln -s /usr/share/zoneinfo/Asia/Ku
Kuala_Lumpur  Kuching       Kuwait
[root@venus wiki]# ln -s /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime

test again

[root@venus wiki]# date
Wed Oct 14 20:54:52 MYT 2015

Done !

M.

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Like

Related Post

Anything to add?

X