Website Vidya
Linux & ServersStep-by-Step Guide

How to Set or Change Timezone on Ubuntu Server and Desktop

Learn how to set or change timezone on ubuntu 24.04 and 22.04 with timedatectl, tzdata, /etc/localtime symlinks, GNOME desktop GUI, and NTP sync.

RR
Rajesh RayLead Systems Educator
Published:
6 min read
PDF Cheat Sheet
How to Set or Change Timezone on Ubuntu Server and Desktop
AI Executive SummaryWebsiteVidya AI

6 min read

Learn how to set or change timezone on ubuntu 24.04 and 22.04 with timedatectl, tzdata, /etc/localtime symlinks, GNOME desktop GUI, and NTP sync.

Key Highlights
  • Prerequisites and Supported Releases
  • Step 1: Checking the Current System Timezone on Ubuntu
  • Step 2: Listing Available Global Timezones
Grounded in full engineering runbookWebsiteVidya AI Engine

Interactive Builder for this Guide

Build your custom systemd syntax (How to Set or Change Timezone on Ubuntu Server and Desktop)

Generated Config Output
[Unit]
Description=Core API Node Service
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=www-data
WorkingDirectory=/opt/myapp
EnvironmentFile=/opt/myapp/.env
ExecStart=/usr/bin/node dist/server.js
Restart=on-failure
RestartSec=5
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target
Systemd service unit running "/usr/bin/node dist/server.js" under user "www-data" with Restart=on-failure.
Flag-by-Flag Breakdown
After=network-online.targetWaits until host networking is online before launching
User=www-dataRuns process with least privilege instead of root
Restart=on-failureAutomatically recovers process after crashes (delay 5s)
NoNewPrivileges=trueSecurity hardening preventing child privilege escalation

Configuring the accurate system timezone on your Ubuntu server or workstation is a vital administrative task with widespread operational consequences.

Accurate timekeeping ensures that system log files record chronological security events properly, scheduled cron jobs trigger at intended local times, SSL/TLS certificates validate without expiration anomalies, and distributed database transactions synchronize reliably across network nodes.

Ubuntu defaults to Coordinated Universal Time (UTC) on most cloud server images, which provides standard consistency across global infrastructure but often requires adjustment to align with local business operating hours.

In this guide, we walk through how to set or change timezone on ubuntu across command-line server environments, interactive terminal dialogs, manual file symlinks, and graphical desktop interfaces.

Advertisement

Prerequisites and Supported Releases

This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat) & Ubuntu 22.04 LTS. The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.

Before proceeding, ensure you have the following requirements satisfied:

  • A server or computer running Ubuntu 24.04 LTS or Ubuntu 22.04 LTS.
  • A non-root user account with sudo administrative privileges.
  • Access to a bash terminal shell or GNOME desktop environment.

Step 1: Checking the Current System Timezone on Ubuntu

Before modifying any time parameters, inspect your system's current date, local time, universal time, and timezone status.

Advertisement

The modern timedatectl utility (part of systemd) provides a comprehensive overview of the host's real-time clock and synchronization status:

Execute timedatectl in your terminal without any flags:

# Check current system time and timezone status:
timedatectl

# Expected output confirms:
#                Local time: Wed 2026-10-23 15:45:10 UTC
#            Universal time: Wed 2026-10-23 15:45:10 UTC
#                  RTC time: Wed 2026-10-23 15:45:10
#                 Time zone: Etc/UTC (UTC, +0000)
# System clock synchronized: yes
#               NTP service: active
#           RTC in local TZ: no

Step 2: Listing Available Global Timezones

Timezones in Linux follow the standard IANA timezone database naming format: Region/City (for example, America/New_York, Europe/London, or Asia/Kolkata).

You can list all available timezones supported by your system using timedatectl list-timezones:

Advertisement

Because the full list contains hundreds of entries, pipe the output through grep to quickly find your region:

# List all available timezones (scrollable with arrow keys):
timedatectl list-timezones

# Filter for specific regions using grep (e.g., America):
timedatectl list-timezones | grep -i "America"

# Filter for specific regions (e.g., Asia or Europe):
timedatectl list-timezones | grep -i "Kolkata"
timedatectl list-timezones | grep -i "London"

Step 3: Setting the Timezone Using timedatectl (Recommended)

Once you identify your desired IANA timezone identifier, set it using the set-timezone subcommand.

This command requires administrative sudo privileges and instantly updates the operating system's active clock configuration without requiring a system reboot:

Run the command specifying your target timezone identifier:

# Set timezone to America/New_York:
sudo timedatectl set-timezone America/New_York

# Or set timezone to Asia/Kolkata:
sudo timedatectl set-timezone Asia/Kolkata

# Confirm that the timezone change took effect immediately:
timedatectl
# Output confirms:
#                 Time zone: America/New_York (EDT, -0400)

Step 4: Changing Timezone Interactively with tzdata

If you prefer a menu-driven terminal interface rather than memorizing exact IANA city names, use the tzdata reconfiguration utility.

Run dpkg-reconfigure tzdata with sudo:

A graphical dialog prompts you to select your geographic area (e.g., Africa, America, Asia, Europe) followed by the specific city or region:

# Launch interactive timezone selection dialog:
sudo dpkg-reconfigure tzdata

# Terminal dialog instructions:
# 1. Use the Up/Down arrow keys to highlight your Geographic area.
# 2. Press Tab to select <Ok> and press Enter.
# 3. Highlight your specific City or Timezone region.
# 4. Press Enter to confirm.

# Output confirms the newly selected local time and link.

Under the hood, Ubuntu determines the system timezone by reading the symbolic link at /etc/localtime, which points to a compiled binary timezone file in /usr/share/zoneinfo/.

In minimal container environments (such as Docker containers) where timedatectl may not be available due to lack of systemd, you can set the timezone manually by updating this symlink directly:

Execute the following commands to update the link manually:

# Remove existing /etc/localtime file or symlink:
sudo rm -f /etc/localtime

# Create a symbolic link pointing to the desired timezone file:
sudo ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime

# Write the timezone identifier to /etc/timezone for legacy tools:
echo "America/Chicago" | sudo tee /etc/timezone

# Verify manual configuration using the date command:
date
# Output confirms: Wed Oct 23 10:45:10 CDT 2026

Step 6: Changing Timezone via GNOME Desktop Settings (GUI)

For users running Ubuntu Desktop with the default GNOME graphical environment, changing the timezone can be done through the Settings application.

Open the Applications menu and launch Settings (or search for 'Settings').

Navigate to the System or Date & Time panel in the left sidebar.

If Automatic Time Zone is enabled, toggle it off to set your location manually, click on Time Zone, search for your nearest major city on the world map, and click Select.

Enabling NTP Network Time Synchronization

Regardless of which timezone you select, maintaining accurate clock drift synchronization via Network Time Protocol (NTP) is essential.

Ubuntu uses systemd-timesyncd as its default lightweight NTP client.

Verify and enable NTP synchronization using timedatectl:

# Enable automatic NTP network time synchronization:
sudo timedatectl set-ntp on

# Check synchronization status:
timedatectl timesync-status
# Output confirms: Server, Poll interval, Leap, Offset, Delay, Jitter

Troubleshooting and Common Errors

When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:

Failed to set timezone: Timezone [Zone/City] not found

Cause: The specified IANA timezone name contains a typo or incorrect capitalization.

Resolution: Check valid spelling using timedatectl list-timezones | grep -i [City].

timedatectl list-timezones | grep -i "tokyo"

System has not been booted with systemd as init system (PID 1). Can't operate.

Cause: Running inside a lightweight Docker container or WSL1 environment that does not use systemd.

Resolution: Set the timezone manually using the /etc/localtime symlink method (sudo ln -sf /usr/share/zoneinfo/... /etc/localtime).

sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime

NTP service: inactive in timedatectl output

Cause: Network time synchronization is disabled or the systemd-timesyncd service is stopped.

Resolution: Enable NTP with sudo timedatectl set-ntp on and restart the service.

sudo timedatectl set-ntp on && sudo systemctl restart systemd-timesyncd

Security Best Practices and Hardening

Keep servers set to UTC if they process financial transactions, distributed microservices, or multi-region database replication to eliminate daylight saving ambiguities.

Ensure firewall rules permit UDP port 123 outbound so your NTP daemon can synchronize with public time servers.

Never run systems without NTP synchronization; clock skew greater than a few minutes breaks Kerberos authentication, AWS API tokens, and SAML single sign-on.

Deepen your Linux system administration skills with our related production-tested guides:

Authoritative References and Official Documentation

Frequently Asked Questions

Quick answers to common questions and configurations

4 FAQs
Best practice strongly recommends setting production servers to UTC (Etc/UTC). UTC eliminates daylight saving time (DST) shifts, simplifies log analysis across distributed clusters, and prevents timestamp discrepancies.
No. timedatectl set-timezone immediately updates the operating system's timezone. However, long-running daemons with cached timezone settings (like database servers or web servers) should be restarted to reflect the change in their application logs.
The RTC (Real Time Clock) is a battery-backed hardware clock on your motherboard that preserves time when the computer is powered off. Linux typically sets the RTC to UTC and converts it to local time for user applications.
Run date -u in your terminal to display the current date and time in Universal Coordinated Time.
RR
Written byVerified Author

Rajesh Ray

I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.

SPAM-FREE MODERATED DISCOURSE

Join the Conversation & Perspective

Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.

AT
MP
JV
+2

No comments on this guide yet. Be the first to share your thoughts or ask a question!

Recommended Reading10 Guides

Related Technical Guides

Tested runbooks, server administration walkthroughs, and troubleshooting guides

Featured Infrastructure PartnerUp to 75% OFF + 3 Months Free

Supercharge Your Linux & Cloud Workloads with Hostinger

Deploy high-speed NVMe KVM VPS, Docker containers, and LiteSpeed-accelerated WordPress servers in under 60 seconds with full root access, dedicated IPv4, and 24/7 technical support.

Pure NVMe SSD StorageFull Root Access & SSHFree Domain & Unlimited SSL99.9% Uptime SLA
Plans from$2.99/mo
Claim Hostinger DealAffiliate link • Special discount applied at checkout