Change Time Zone On Linux VPS

Written by Jahangir on October 28, 2008 – 3:45 am -

QUESTION
Is it possible to change system time in a VPS?

SOLUTION
You cannot change system 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. Login as a Root.

2. Issue the following command.

[root@support ~]# 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 the current localtime file.

[root@support ~]# mv /etc/localtime  /etc/localtime_org

4. Now update the localtime.

[root@support ~]# 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.

[root@support007 ~]# date

Restart your VPS to take proper effect of the changes.

Update me when site is updated

Tags: , , ,
Posted in Dedicated Server Hosting | No Comments »
RSS

  • Subscribe Me

  • Tag Cloud

  • Archives