Changing the time zone on an unmanaged hosting account

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

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

👍

Tip

  • 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.

    📘

    Note

    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
    

    📘

    Note

    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.

Related Articles