How to Change Timezone on Ubuntu 22.04. In this guide you are going to learn how to configure or setup your own timezone on Ubuntu server.
Having a local time is necessary on your server for some cronjob or any system related processes. By default, when a server is provisioned a default timezone will get configured automatically with the Coordinated Universal Time (UTC). You can change the timezone later using the below method.
Here you will learn how to use the
timedatectl command to change timezone.
Access to server using
root or user who has
Check Current Timezone
To check the configured time zone that your server uses currently you can use the following command on your Ubuntu 22.04 machine.
You will get an output similar to the one below.
Output Local time: Mon 2022-05-23 01:50:57 UTC Universal time: Mon 2022-05-23 01:50:57 UTC RTC time: Mon 2022-05-23 01:50:57 Time zone: Etc/UTC (UTC, +0000) System clock synchronized: yes NTP service: active RTC in local TZ: no
Now the time zone configured is UTC.
The system timezone is configured by creating a symbolic link of
/etc/localtime to a binary timezone identifier in the
You can also view the timezone by viewing the
timezone file created inside the
Change Timezone in Ubuntu
Now you can proceed to change the default timezone to your location. The time zones in Ubuntu uses the “Region/City” format.
So, you need to find your region and city using the
list-timezones option with the
This command outputs all the available time zones.
Output Africa/Abidjan Africa/Accra Africa/Algiers Africa/Bissau Africa/Cairo . . .
Enter to load additional available time zones.
Once you have found your time zone you use the below format to setup your own time zone.
sudo timedatectl set-timezone your_time_zone
If your time zone is America/Los_Angeles, your format should be like this
sudo timedatectl set-timezone America/Chicago
Now you can again use the
timedatectl command to confirm the time zone update.
Output Local time: Sun 2022-05-22 20:53:00 CDT Universal time: Mon 2022-05-23 01:53:00 UTC RTC time: Mon 2022-05-23 01:53:00 Time zone: America/Chicago (CDT, -0500) System clock synchronized: yes NTP service: active RTC in local TZ: no
Now you have learned how to change time zone in your Ubuntu 22.04 machine.
Thanks for your time. If you face any problem or any feedback, please leave a comment below.