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:
-
Log in to the server using SSH.
-
To view the current time zone, type the following command:
timedatectl
-
To view a list of available time zones, type the following command:
timedatectl list-timezones
-
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
-
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:
-
Log in to the server using SSH.
-
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
-
Use the arrow keys to select the geographic area, and then press Enter.
-
Use the arrow keys to select the city or region in the time zone that you want, and then press Enter.
Related Articles
Updated 3 days ago