Jun 26, 2023 4 min read

How to Set or Change Timezone on Ubuntu 22.04

Set or Change Timezone on Ubuntu 22.04 with our tutorial. It synchronizes your system time with the local time of your location.

Set or Change Timezone on Ubuntu 22.04
Table of Contents

Introduction

Before we begin talking about steps to set or change Timezone on Ubuntu 22.04, let's briefly understand – What is a Timezone?

A timezone refers to a specific geographical region with a standardized time offset from Coordinated Universal Time (UTC). It helps users synchronize their system time with the local time of their location.

Timezones are essential for accurate scheduling, coordinating meetings, and ensuring timely execution of tasks. Ubuntu provides an easy-to-use interface to select and configure the timezone settings, allowing users to set their system time according to their location and avoid confusion in time management.

In this tutorial, you will set or change the Timezone on Ubuntu 22.04. We will also address a few FAQs on how to set or change Timezone on Ubuntu 22.04.

Advantages of Setting or Changing Timezone

  1. Synchronization: Setting the timezone ensures your system time matches the local time, enabling accurate scheduling and coordination.
  2. Global Connectivity: Changing the timezone allows seamless communication with people in different regions, avoiding time-related misunderstandings.
  3. Travel Convenience: Adjusting the timezone helps travellers adapt their devices to the local time, making planning and coordination easier.
  4. Timely Operations: Setting the correct timezone ensures tasks and processes are executed at the right time, enhancing efficiency and productivity.
  5. Meeting Management: Changing the timezone helps schedule meetings across different time zones, ensuring participants join at the appropriate times.

Prerequisites to Set or Change Timezone on Ubuntu 22.04

1) Make sure to log in as root, or a user with sudo privileges.

Check Current Timezone

1) In Ubuntu and other Linux distributions, you can use timedatectl command to display the system's time and date:

timedatectl

You will see in the output that the timezone is set to UTC:

Output 

Local time: Mon 2021-08-16 22:45:47 UTC
                  Universal time: Mon 2021-08-16 22:45:47 UTC
                        RTC time: Mon 2021-08-16 22:45:48
                       Time zone: Etc/UTC (UTC, +0000)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

2) You can configure the system timezone by symlinking etc/localtime to a binary timezone identifier in the /usr/share/zoneinfo directory.

ls -l /etc/localtime
Output

lrwxrwxrwx 1 root root 16 August 10 12:59 /etc/localtime -> /usr/share/zoneinfo/Etc/UTC

3) Also, you can check the current system’s timezone by displaying the contents of /etc/timezone file:

cat /etc/timezone
Output

Etc/UTC

Changing the Timezone Using timedatectl Command

1) Firstly, you need to find the long name for the timezone you want to use. The timezone naming convention basically uses a Region/City format.

To list all available time zones, either list the files in /usr/share/zoneinfo directory or use the timedatectl command with the list-timezones option:

timedatectl list-timezones
Output

...
Europe/Oslo
Europe/Paris
Europe/Podgorica
Europe/Prague
Europe/Riga
Europe/Rome
Europe/Samara
...

2) Once you have decided which time zone will suit you, run the following command:

sudo timedatectl set-timezone your_time_zone

3) Like, change the system’s timezone to Europe/Rome:

sudo timedatectl set-timezone Europe/Rome

4) After that, run the timedatectl command. It is to verify the changes, by:

timedatectl
Output

 Local time: Thu 2019-01-24 00:27:43 CET
                  Universal time: Wed 2019-01-23 23:27:43 UTC
                        RTC time: Wed 2019-01-23 23:27:44
                       Time zone: Europe/Rome (CET, +0100)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

Changing the Timezone Using GUI

You can use GUI to change the current system's Timezone if you are using an Ubuntu Desktop.

1) Open the system settings window by clicking on the Settings icon.

2) Now, in the system settings window click on Date & Time tab. If the Automatic Timezone is set to ON and you have an internet connection and location service enabled then Timezone should be automatically selected based on your Timezone.

3) If you want to select the new timezone, click on the map or search for a time zone via the search bar.

After this, click on × to close the window.

FAQs to Set or Change Timezone on Ubuntu 22.04

Can I change the timezone through the graphical interface in Ubuntu 22.04?

Yes, you can. Simply go to Settings, select Date & Time, and choose your desired timezone from the Timezone dropdown menu.

How can I see the current timezone settings in Ubuntu 22.04?

You can use the command timedatectl show in the terminal and look for the Timezone field to see the current timezone.

Is it possible to set the timezone automatically based on my location in Ubuntu 22.04?

Yes, Ubuntu 22.04 supports automatic timezone detection. In the Date & Time settings, enable the Automatic Timezone option.

Can I change the timezone without root or administrator privileges?

No, changing the timezone requires administrative privileges. You need to use the sudo command or have root access.

What should I do if my desired timezone is not listed in the Ubuntu 22.04 timezone selection?

You can install additional time zone data by running the command sudo apt-get install tzdata and selecting your timezone during the installation process.

Will changing the timezone affect the system's clock?

Yes, changing the timezone will adjust the system clock accordingly to reflect the new local time of the selected timezone.

Can I set different timezones for different user accounts on Ubuntu 22.04?

No, the timezone setting is system-wide and applies to all user accounts on Ubuntu 22.04.

Can I revert to the default timezone settings in Ubuntu 22.04?

Yes, you can set the timezone back to the default by using the command sudo timedatectl set-timezone UTC or selecting UTC from the graphical interface.

Conclusion

We hope this detailed guide helped you to set or change the timezone on Ubuntu 22.04.

If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.