How to Set the Timezone on Ubuntu 24.04

Configuring the correct timezone on Ubuntu 24.04 is crucial for ensuring accurate system timing—vital for log tracking, CronJob scheduling, application runtime behavior, and personalized tasks. The timezone influences your system clock settings, which are necessary for executing time-based operations reliably.

This guide will walk you through adjusting the timezone on Ubuntu 24.04 using the timedatectl tool, helping you align system time with your local region or application-specific requirements.

Requirements

Before proceeding, make sure that:

  • You have access to a device running Ubuntu 24.04.

How to Verify the Current Timezone

Before modifying your system’s timezone, it’s a good practice to first check the current setting. This allows you to revert if needed. The timedatectl command-line tool lets you view and manage timezone configurations on Ubuntu. Here’s how to check your existing timezone on Ubuntu 24.04:

Use the command below to display the active timezone and synchronization status:

Sample 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

The above result shows that the current timezone is Etc/UTC, representing Coordinated Universal Time. If this timezone isn’t suitable, the following sections show how to find and set a different one.

Display All Available Timezones on Ubuntu 24.04

Use the steps below to view the complete list of supported timezones:

Run the following command to output all available timezone names:

$ timedatectl list-timezones

You can use the spacebar to scroll through the output. Examples of available entries:

Africa/Abidjan
Africa/Accra

America/Adak
America/Anchorage

Antarctica/Troll
Antarctica/Vostok
Arctic/Longyearbyen

Asia/Ashgabat
Asia/Atyrau
Asia/Baghdad

If you want to filter the output to find a specific timezone—such as “Bogota”—you can use grep like this:

$ timedatectl list-timezones | grep "Bogota"

Expected output:

Change the Timezone on Ubuntu 24.04

Follow the procedure below to update the system timezone on your Ubuntu 24.04 environment:

Use set-timezone followed by your desired timezone name:

$ sudo timedatectl set-timezone YOUR_TIMEZONE

For instance, to switch to the America/Bogota timezone, enter:

$ sudo timedatectl set-timezone America/Bogota

After applying the new timezone, you can verify it using:

Sample output after setting the timezone:

               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

This output confirms that your system is now using America/Bogota as its timezone.

Summary

You’ve now successfully configured the timezone on Ubuntu 24.04 using the timedatectl command-line tool. Accurate timezone settings are essential for ensuring your applications and services execute tasks at the intended times. For further configuration options and details, consult the manual by running man timedatectl. You may also consider syncing your system time using NTP (Network Time Protocol) to ensure consistency.

Source: vultr.com

Create a Free Account

Register now and get access to our Cloud Services.

Posts you might be interested in:

Moderne Hosting Services mit Cloud Server, Managed Server und skalierbarem Cloud Hosting für professionelle IT-Infrastrukturen

Real-Time Water Billing with PHP, Redis Pub/Sub & MySQL

MySQL, Tutorial

Linux file permissions with this comprehensive guide. Understand how to utilize chmod and chown commands to assign appropriate access rights, and gain insights into special permission bits like SUID, SGID, and the sticky bit to enhance your system’s security framework.

Moderne Hosting Services mit Cloud Server, Managed Server und skalierbarem Cloud Hosting für professionelle IT-Infrastrukturen

Create a PHP REST API with JSON on Ubuntu 20.04

Tutorial, Ubuntu

Linux file permissions with this comprehensive guide. Understand how to utilize chmod and chown commands to assign appropriate access rights, and gain insights into special permission bits like SUID, SGID, and the sticky bit to enhance your system’s security framework.