As a VPS user, you can not change server time in a VPS because all VPS’s on the hardware node have the same system time. However, it is possible to change the default system timezone inside a VPS, for example, by replacing /etc/localtime with the file from /usr/share/zoneinfo which contains a description of your timezone.

1. Log in as a Root.

2. Issue the following command.

[[email protected] ~]# tzselect

tzselect will prompt you with a series of questions to determine the appropriate time zone file to use.
Check the last line after tzselect is completed, it should look like: “Region/City”

3. Take the backup of the current local time file.

[[email protected] ~]# mv /etc/localtime  /etc/localtime_org

4. Now update the localtime.

[[email protected] ~]# ln -s /usr/share/zoneinfo/"Region/City" /etc/localtime

Replace “Region/City” with the information given by tzselect [without “”].

5. Verify the changes done by “date” command.

[[email protected] ~]# date

Restart your VPS to take proper effect of the changes.

Comments

comments

Recent Posts
Contact Us

We'd love to hear from you, we'll get back to you soon.

Start typing and press Enter to search