How to change the time zone in centos7

  Operating System

In order to check which time zone you are following it can be checked with,


date

or it can be checked with


ls -l /etc/localtime

Make a soft link with following command


ln -s /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime

Edit the following file rc.local with any text editor

vi /etc/rc.d/rc.local

and add the following line

/usr/sbin/ntpdate pool.ntp.org

and then change the file permission to 755


chmod 755 /etc/rc.d/rc.local