Knowledgebase

Search

Change time zone in a Dedicated Server / VPS

Need to adjust the time zone for your VPS or dedicated server? This article covers how to easily update your server's time zone setting.
Table of Contents

This article describes how to change the time zone in Site Hosting Club VPS and Dedicated Servers.

Note! You must have root access to the server to change the time zone.

 

CentOS and Ubuntu servers

To change the time zone on a server running CentOS or Ubuntu, follow these steps:

1. Log in to the server using SSH.

2. To view the current time zone, type the following command:

          timedatectl

3. To view a list of available time zones, type the following command:

          timedatectl list-timezones

4. As the root user, type the following command to change the time zone. Replace timezone with the name of the time zone you obtained in step 3:

          timedatectl set-timezone timezone

For example, to set the time zone to Calcutta, India, type

          imedatectl set-timezone India/Calcutta.

5. To verify the new time zone change, type the following command:

          timedatectl

 

Debian servers

To change the time zone on a server running Debian, follow these steps:

1. Log in to the server using SSH.

2. As the root user, type the following command

          dpkg-reconfigure TZDATA

Alternatively, as a non-root user you can type the following command if the account has sudo privileges:

         sudo dpkg-reconfigure TZDATA

4. Use the arrow keys to select the geographic area, and then press Enter.
5. Use the arrow keys to select the city or region in the time zone that you want, and then press Enter.

Leave Your Comment