It is assumed, though not necessary, that you have already installed a hosting panel like Kloxo or Virtualmin.

Changing timezone in OpenVZ

The file /etc/localtime is the one which holds information of server’s timezone.

We shall point it to the correct zone file by creating a soft link.

Run following commands:

Changing timezone in Xen

1. Change timezone using steps mentioned above for OpenVZ

2. Run following command

3. Installed ntp

4. Turned on service

5. Synchronized the system clock with 0.pool.ntp.org server:

6. Started the NTP:

7. Reboot the VPS

Now you will notice that after rebooting the VPS it again shows wrong time.

Actually you have to set the independent clock every time you reboot the server. To do this, put following lines in /etc/rc.local.

You would now get correct timezone and correct time every time you reboot your Xen VPS.

Setting Time Zone in a cPanel installed server

1. Open a web browser and connect to your cPanel Control Panel located athttps://ip_address:2087.

2. Login as the root using the information sent to you in your setup email.

3. From the Server Configuration menu, click Server Time.

4. Select your time zone from the drop down list.

5. Click Change TimeZone.

6. Click Sync Time with Time Server to sync the time with the time zone.