How to Set the Timezone on Ubuntu 22.04

Updated on 30 April, 2025
How to Set the Timezone on Ubuntu 22.04 header image

Setting the timezone on Ubuntu 22.04 ensures accurate system time for tasks like log management, CronJobs, and application scheduling. The correct timezone is essential for time-sensitive operations.

This article explains how to set the timezone using the timedatectl utility to match your region or application needs.

Prerequisites

Before you begin, you need to:

Check the Active Timezone

Before changing the timezone on Ubuntu 22.04, verify the current active timezone to revert to the initial configuration if needed. Use the timedatectl utility to view and manage timezones. Follow the steps below to check the active timezone.

  • Check the active timezone and time synchronization status.

    console
    $ timedatectl
    

    Output:

                   Local time: Thu 2025-01-08 14:35:22 UTC
               Universal time: Thu 2025-01-08 14:35:22 UTC
                     RTC time: Thu 2025-01-08 14:35:22
                    Time zone: Etc/UTC (UTC, +0000)
    System clock synchronized: yes
                  NTP service: active
              RTC in local TZ: no

    Based on the above output, Etc/UTC UTC (Coordinated Universal Time) is the active timezone and the primary time standard on Ubuntu. If the active timezone does not match your needs, follow the sections below to find all available time zones and change the timezone.

List Timezones on Ubuntu 22.04

Follow the steps below to list all available timezones on Ubuntu 22.04.

  1. Use the following command to display all available timezones:

    console
    $ timedatectl list-timezones
    

    Press Space to browse the list of available timezones in your output similar to the one below.

    Africa/Abidjan
    Africa/Accra
    ...................................
    America/Adak
    America/Anchorage
    .........................
    Antarctica/Troll
    Antarctica/Vostok
    Arctic/Longyearbyen
    .........................
    Asia/Ashgabat
    Asia/Atyrau
    Asia/Baghdad
    ..................
  2. Run the following command to filter the output using the grep command to search for a specific timezone or location. For example, Bogota.

    console
    $ timedatectl list-timezones | grep -i "Bogota"
    

    Output:

    America/Bogota

Set the Timezone on Ubuntu 22.04

Follow these steps to set the timezone on your Ubuntu 22.04 workstation:

  1. Use the set-timezone option to specify and change the desired timezone on your system.

    console
    $ sudo timedatectl set-timezone YOUR_TIMEZONE
    

    For example, run the following command to set the timezone to America/Bogota.

    console
    $ sudo timedatectl set-timezone America/Bogota
    
  2. View the active timezone information and verify that the new change is applied.

    console
    $ timedatectl
    

    Output:

                   Local time: Sun 2025-01-12 22:19:15 -05
               Universal time: Mon 2025-01-13 03:19:15 UTC
                     RTC time: Mon 2025-01-13 03:19:15
                    Time zone: America/Bogota (-05, -0500)
    System clock synchronized: yes
                  NTP service: active
              RTC in local TZ: no

    Based on the above output, the active timezone is America/Bogota.

Conclusion

In this article, you have set the timezone on Ubuntu 22.04 using the timedatectl utility. Accurate timezone information ensures that your system applications and utilities use accurate time to perform specific tasks. You can synchronize your system clock with an NTP (Network Time Protocol) server to update the time depending on your needs. For more configuration options, run the man timedatectl command to view the timedatectl manual page.

Comments

No comments yet.