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.

Related Post

One Response

  1. dotsha says:

    Since “?” in bash wildcard matches exactly one character …

    rm -f ??????????

    would be faster to type … 😎

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *