The file /etc/localtime is the one which holds information of server’s timezone.
For changing the timezone you should point it to the correct zone file by creating a soft link.
From following commands below we are changing the current timezone to IST:
Firstly move the current localtime file as backup.
#mv /etc/localtime /etc/localtime.bakNow from /usr/share/zoneinfo/ you can find the preferred timezone. Once you found the timezone file, crate a soft link to /etc/localtime. Eg: For IST
#ln -sf /usr/share/zoneinfo/Asia/Calcutta /etc/localtimeOnce the link is created, reboot the vps.
#reboot
No comments:
Post a Comment