GICT knowledge base
How to Set the Timezone on Ubuntu 24.04
Published
Keeping your system clock accurate is crucial for running time-based tasks such as scheduled cron jobs, application logging, and server synchronization. When your system operates in the wrong timezone, it can lead to confusion, inaccurate logs, or even failed automated tasks.
Ubuntu 24.04 makes it simple to manage and configure the timezone using the timedatectl utility — a built-in tool that lets you view, set, and synchronize your system’s date and time.
In this guide, you’ll learn step-by-step how to check, list, and change the timezone on Ubuntu 24.04 to match your location or application requirements.
Prerequisites
Before you start, ensure you have:
- Access to an Ubuntu 24.04 system (local or remote).
- Sudo privileges to modify system settings.
Step 1: Check the Current Timezone
Before making any changes, it’s best to check the active timezone on your system. This helps you note the existing configuration in case you want to revert later.
Run the following command to view the current timezone and synchronization status:
$ timedatectl
Output:
Local time: Thu 2025-10-30 22:56:51 IST Universal time: Thu 2025-10-30 17:26:51 UTC RTC time: Thu 2025-10-30 17:26:51 Time zone: Asia/Kolkata (IST, +0530) System clock synchronized: yes NTP service: active RTC in local TZ: no
As you can see, the active timezone is Asia/Kolkata (IST). If this doesn’t match your desired region, continue to the next step to explore all available timezones.
Step 2: List All Available Timezones
Ubuntu provides an extensive list of available timezones, which you can view using the command below:
$ timedatectl list-timezones
You’ll get a long list of regions and cities similar to this:
Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmara Africa/Brazzaville America/Adak America/Anchorage America/Argentina/Buenos_Aires America/Bogota Asia/Baghdad Asia/Bangkok Asia/Kolkata Australia/Sydney Europe/London Pacific/Auckland
To narrow down the results and search for a specific location, you can use grep. For example, to search for all timezones related to Bogota, run:
$ timedatectl list-timezones | grep "Bogota"
Output:
America/Bogota
Step 3: Set the Timezone on Ubuntu 24.04
Now that you’ve identified your desired timezone, you can set it using the timedatectl set-timezone command.
Use the following syntax:
$ sudo timedatectl set-timezone YOUR_TIMEZONE
For example, to change your system timezone from Asia/Kolkata to America/Bogota, run:
$ sudo timedatectl set-timezone America/Bogota
This will immediately update your system’s timezone.
Step 4: Verify the New Timezone
After updating the timezone, verify the change using the following command:
$ timedatectl
Output:
Local time: Thu 2025-10-30 12:26:51 -05 Universal time: Thu 2025-10-30 17:26:51 UTC RTC time: Thu 2025-10-30 17:26:51 Time zone: America/Bogota (-05, -0500) System clock synchronized: yes NTP service: active RTC in local TZ: no
To confirm the new system time, run:
$ date
Output:
Thursday 30 October 2025 12:28:17 PM -05
Your system is now successfully using the America/Bogota timezone, which is 10 hours and 30 minutes behind Asia/Kolkata (IST).
Step 5: Enable or Check NTP Synchronization (Optional)
Ubuntu 24.04 uses Network Time Protocol (NTP) to keep your system clock synchronized with global time servers. You can verify if NTP synchronization is active with:
$ timedatectl show | grep NTPSynchronized
Output:
NTPSynchronized=yes
If synchronization is disabled, you can enable it with:
$ sudo timedatectl set-ntp true
This ensures your system clock automatically adjusts for time drift or daylight savings.
Common Use Cases for Timezone Configuration
Here are a few scenarios where setting the correct timezone is essential:
- Server Management: Accurate logs and timestamps make debugging much easier.
- Database Systems: Prevent inconsistencies caused by mismatched timezones across clusters.
- Cron Jobs: Ensure scheduled tasks run at the correct local time.
- Web Applications: Match user activity or business hours to a specific regional time.
Troubleshooting Timezone Issues
If your system clock doesn’t update correctly after changing the timezone:
- Make sure the NTP service is active:
$ systemctl status systemd-timesyncd - Restart the time synchronization service:
$ sudo systemctl restart systemd-timesyncd
Conclusion
In this guide, you learned how to check, list, and set the timezone on Ubuntu 24.04 using the timedatectl utility. Correct timezone configuration ensures your applications, logs, and automation tasks stay in sync with the real world — no matter where your system is located.
Whether you’re managing a local workstation or a production server, taking a few minutes to set the right timezone helps you avoid potential time-related errors and keeps your system running smoothly.
Related guides
How to Restrict an SSH Key to One Command
Restrict an SSH key to one command with authorized_keys options. Protect the command and check that unwanted shell and forwarding access are denied.
Linux and CommandsSelf-Hosted Video Processing With FFmpeg: A Practical Guide
Learn how to self-host video processing on a VPS using FFmpeg, with practical commands for conversion, compression, thumbnails, and automated workflows.
Linux and CommandsHow to use nohup: Commands in Linux That Survive Terminal Closes
Keep commands running after you close the terminal. nohup examples with wget, Python, rsync, and Docker on any VPS.
Linux and CommandsHow to Fix “Too Many Open Files” Error on Linux Servers
Learn how to fix the "Too Many Open Files" error on Linux servers by understanding file descriptors, adjusting limits, and diagnosing leaks effectively.
