[root@server~]# ln -sf /usr/share/zoneinfo/CET /etc/localtime

[root@server~]# ln -sf /usr/share/zoneinfo/Asia/Calcutta localtime

 * In above example you need to use directory structure i.e. if you want to set the timezone to Calcutta (India) which is located in the Asia directory.

 [root@server~]# su -l

 [root@server~]# hwclock –show

 To update hardware clock in UTC

 [root@server~]# hwclock –utc –systohc

 To update it to your local time leave off the –utc or add –localtime and leave off the –utc.

[root@server~]# hwclock –systohc

 You can use TZ environment variable to display date and time according to your timezone:

export TZ=America/Los_Angeles

 TZ=’GMT/UTC +1′

 [root@server~]# export TZ

 To see list of time zones

 [root@server~]# tzselect

Posted in: Linux.
Last Modified: January 12, 2017

Leave a reply