How To Change Timezone On Ubuntu

By bhagwatchouhan
How To Change Timezone On Ubuntu

The default timezone of all the cloud-based installations of the Ubuntu servers is UTC. We can choose the timezone while installing the desktop version of Ubuntu. Most of the applications are dependent on the system timezone to process date and time specific tasks or data. Also, we can specify the application-specific timezone depending on the application configurations. This tutorial provides the steps required to view and change the timezone of Ubuntu 20.04 LTS using both command line i.e. terminal and graphical options. The steps should be the same on other versions of Ubuntu and Linux systems.

 

Change Timezone - Command Line

We can use the command timedatectl to view the system timezone as shown below.

# View Timezone
timedatectl
# Output - Server Local time: Thu 2020-06-04 12:05:19 UTC Universal time: Thu 2020-06-04 12:05:19 UTC RTC time: Thu 2020-06-04 12:05:20 Time zone: Etc/UTC (UTC, +0000) System clock synchronized: yes NTP service: active RTC in local TZ: no # Output - Desktop Local time: Thu 2020-06-04 16:47:32 IST Universal time: Thu 2020-06-04 11:17:32 UTC RTC time: Thu 2020-06-04 11:17:32 Time zone: Asia/Kolkata (IST, +0530) System clock synchronized: yes NTP service: active RTC in local TZ: no

It shows the Local time and the Time zone. We can further refine it as shown below.

# View Timezone
timedatectl status | grep "Time zone"
# Output - Server Time zone: Etc/UTC (UTC, +0000)
# Output - Desktop
Time zone: Asia/Kolkata (IST, +0530)

We can also check the system timezone using the symbolic link /etc/localtime as shown below.

# View Timezone
ls -l /etc/localtime
# Output - Server lrwxrwxrwx 1 root root 27 Jun 2 07:06 /etc/localtime -> /usr/share/zoneinfo/Etc/UTC
# Output - Desktop lrwxrwxrwx 1 root root 32 May 27 22:45 /etc/localtime -> /usr/share/zoneinfo/Asia/Kolkata

We can get the current timezone of the system using the above-mentioned commands. We can also list the allowed values of timezone using the timedatectl command as shown below.

# List Timezones
timedatectl list-timezones
# Output Africa/Abidjan Africa/Accra --- --- America/Adak America/Anchorage America/Araguaina --- --- Asia/Kathmandu Asia/Khandyga Asia/Kolkata Asia/Krasnoyarsk ---- ---- Pacific/Wake Pacific/Wallis UTC

It provided a list of 349 different timezones while writing this tutorial.

We can use the command timedatectl to change the system timezone as shown below.

# Change Timezone
sudo timedatectl set-timezone America/Los_Angeles

Verify the updated timezone using the timedatectl command as shown below.

# Check Timezone
timedatectl
# Output Local time: Thu 2020-06-04 04:35:19 PDT Universal time: Thu 2020-06-04 11:35:19 UTC RTC time: Thu 2020-06-04 11:35:19 Time zone: America/Los_Angeles (PDT, -0700) System clock synchronized: yes NTP service: active RTC in local TZ: no

These are the basic commands to get the current timezone, list the available timezones,  and change it to the given value.

 

Change Timezone - Desktop

This section provides the steps to change the timezone using the GUI provided by the Ubuntu 20.04 LTS Desktop. Click the Show Applications Icon at the bottom right of the desktop. It will show the applications as shown in Fig 1. You might be required to scroll down and find the Settings Application as shown in Fig 1.

Ubuntu 20.04 LTS - Settings

Fig 1

Now click the Settings Icon as highlighted in Fig 1 and also click the Date and Time Option at the bottom of the Left Sidebar as highlighted in Fig 2.

Ubuntu 20.04 LTS - Date & Time Settings

Fig 2

Now click the Timezone as highlighted in Fig 2. It will show the dialog to change the timezone as shown in Fig 3.

Ubuntu 20.04 LTS - Change Timezone

Fig 3

The timezone of the system gets updated as we click the World Map.

 

Summary

This tutorial provided the steps required to change or update the timezone on Ubuntu 20.04 LTS. It provided the steps to change timezone using both command line and desktop options.

Share this blog:

Profile picture for user bhagwatchouhan
bhagwatchouhan