How to change the time zone on an unmanaged hosting account

This article describes how to change the time zone on an unmanaged hosting account, including unmanaged VPS and dedicated servers.

  • You must have root access to the server to change the time zone.
  • For information about changing the time zone on a managed hosting account, please see this article.

AlmaLinux and Ubuntu servers

To change the time zone on a server running AlmaLinux 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 Paris, France, type timedatectl set-timezone Europe/Paris.

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

    sudo timedatectl set-timezone timezone
  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
  3. Use the arrow keys to select the geographic area, and then press Enter.
  4. Use the arrow keys to select the city or region in the time zone that you want, and then press Enter.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.