Coordinated Universal Time (UTC), a successor to GMT, is the standard to regulate time across the world. A Time Zone help us to standardised time across a particular region. So, geographic regions are divided in various time zones across the world. Furthermore, time in Ubuntu distribution would be different from the actual time if we have not specified our time zone during installation or later. In this article, we will discuss how to change time zone in Ubuntu 20.04 LTS release.
There are two command-line options through which we can change time zones in our Ubuntu distribution –
- tzdata,
- timedatectl.
Note: Following operations would require you to have superuser privileges. In case you don’t have one, then contact your System Administrator for assistance.
Change Time Zone through tzdata
Install the package tzdata, if its not installed as default for you. Since, its already there in standard Ubuntu repository. Therefore, update the repository to get the latest version of package. Hence, issue the following in terminal –
sudo apt update
To install tzdata –
sudo apt install tzdata
Next, to make changes to Time Zone –
sudo dpkg-reconfigure tzdata
It will prompt us to select the geographic area where we live. Then, select the Location. For instance, if you are staying in an area which corresponds to Europe/Berlin time zone. Then, select Europe –> Berlin.
Thereafter, it will show us the current time zone, local time and universal time confirming the changes.
Change Time Zone through timedatectl
Firstly, list the available time zones through timedatectl command-line utility –
timedatectl list-timezones
Since the list of Region/Location_Code is lengthy. Therefore, use grep command-line utility to find one for yourself –
timedatectl list-timezones | grep -i [region]
For instance –
timedatectl list-timezones | grep -i Europe
And, note down the format of time zone for your geographic region. Lastly, to make changes –
timedatectl set–timezone Region/Location_Code
Example – if you want to change time zone to Europe/Berlin. Then –
timedatectl set–timezone Europe/Berlin
Lastly, issue the following to see the changes –
timedatectl
In conclusion, we have discussed how to change time zone in Ubuntu 20.04 LTS release.