Skip to main content
  1. Linux Articles/
  2. Ubuntu 26.04 LTS Server/

Setting the Timezone and Time Synchronisation on Ubuntu 26.04 LTS Server

Table of Contents

Checking and Changing the Timezone

This article explains how to set the timezone of Ubuntu 26.04 LTS Server to Japan Standard Time (JST) and how to check time synchronisation (NTP).

A server’s time has two parts: the actual time, which is kept in Coordinated Universal Time (UTC), and the timezone used to display it. Changing the timezone leaves the underlying time untouched and only changes how it is shown.

Reading the Current Settings

Running timedatectl with no arguments shows the time and timezone settings together.

Command to check the time settings
timedatectl
Example: the settings before the change
kazulog@sv1:~$ timedatectl
               Local time: Thu 2026-09-10 23:23:24 UTC
           Universal time: Thu 2026-09-10 23:23:24 UTC
                 RTC time: Thu 2026-09-10 23:23:24
                Time zone: UTC (UTC, +0000)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
kazulog@sv1:~$ date
Thu Sep 10 23:23:24 UTC 2026
kazulog@sv1:~$
FieldMeaning
Local timeThe time as displayed with the timezone applied
Universal timeThe time in UTC. What the server actually keeps
RTC timeThe hardware clock built into the machine
Time zoneThe configured timezone and its offset from UTC
System clock synchronizedWhether time synchronisation has completed
NTP serviceWhether the synchronisation service is running
RTC in local TZWhether the hardware clock holds local time. no (UTC) is standard on Linux

Choosing from the List of Timezones

timedatectl list-timezones lists what can be set. This system offers 485 entries.

Command to list the timezones
timedatectl list-timezones

Entries take the form “Region/City”. Filter with grep to find the one you want.

Example: searching the list
kazulog@sv1:~$ timedatectl list-timezones | wc -l
485
kazulog@sv1:~$ timedatectl list-timezones | grep Tokyo
Asia/Tokyo
kazulog@sv1:~$ timedatectl list-timezones | grep '^America/New' 
America/New_York
kazulog@sv1:~$ timedatectl list-timezones | head -5
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara

Changing the Timezone

Command to change the timezone
sudo timedatectl set-timezone [TIMEZONE]
FieldValue
[TIMEZONE]The timezone to set (Asia/Tokyo for Japan)
Example: changing the timezone
kazulog@sv1:~$ date
Thu Sep 10 23:23:42 UTC 2026
kazulog@sv1:~$ sudo timedatectl set-timezone Asia/Tokyo
kazulog@sv1:~$ date
Fri Sep 11 08:23:42 JST 2026
kazulog@sv1:~$ timedatectl
               Local time: Fri 2026-09-11 08:23:42 JST
           Universal time: Thu 2026-09-10 23:23:42 UTC
                 RTC time: Thu 2026-09-10 23:23:42
                Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
kazulog@sv1:~$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 32 Sep 11 08:23 /etc/localtime -> ../usr/share/zoneinfo/Asia/Tokyo
kazulog@sv1:~$ cat /etc/timezone
Asia/Tokyo

date jumps nine hours ahead and UTC becomes JST. Universal time has not changed: only the timezone used for display was switched.

The change takes effect immediately, survives a reboot, and applies to the current shell from the next command onwards.

Where the Setting Lives

The timezone is stored as a symbolic link at /etc/localtime, and changing it re-points that link.

The ls -l /etc/localtime line in the example above shows the result. Before the change it pointed at UTC.

Example: the link before the change
kazulog@sv1:~$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 25 Sep 10 23:23 /etc/localtime -> ../usr/share/zoneinfo/UTC
kazulog@sv1:~$ cat /etc/timezone 2>&1
Asia/Tokyo
A file named /etc/timezone also exists, but it is not always updated immediately when timedatectl changes the setting. In the example above it still read Asia/Tokyo while /etc/localtime pointed at UTC. To read the current setting, use the output of timedatectl or the target of /etc/localtime.

Checking Time Synchronisation (NTP)

The timezone is a display setting; keeping the clock correct is the job of NTP. Ubuntu 26.04 runs chrony by default.

Command to check the synchronisation service
systemctl is-active chrony systemd-timesyncd
Example: checking the synchronisation service
kazulog@sv1:~$ systemctl is-active chrony systemd-timesyncd 2>&1
active
inactive
kazulog@sv1:~$ systemctl status chrony --no-pager -l | head -6 | cat
● chrony.service - chrony, an NTP client/server
     Loaded: loaded (/usr/lib/systemd/system/chrony.service; enabled; preset: enabled)
     Active: active (running) since Fri 2026-09-11 08:22:49 JST; 1min 3s ago
 Invocation: 9941d684136d4c4588fc2c5ce8bbb390
       Docs: man:chronyd(8)
             man:chronyc(1)
kazulog@sv1:~$

chronyc tracking shows the state of synchronisation and chronyc sources the servers in use.

Commands to check synchronisation
chronyc tracking
chronyc sources
Example: checking synchronisation
kazulog@sv1:~$ chronyc tracking | head -6
Reference ID    : B97DBE7A (ntp-nts-2.ps5.canonical.com)
Stratum         : 3
Ref time (UTC)  : Thu Sep 10 23:23:03 2026
System time     : 0.000019870 seconds fast of NTP time
Last offset     : -0.017891990 seconds
RMS offset      : 0.017891990 seconds
kazulog@sv1:~$ chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* ntp-nts-2.ps5.canonical.>     2   6    17    51    +21ms[+2725us] +/-  119ms
^+ ntp-nts-3.ps5.canonical.>     2   6    17    51    +17ms[-1165us] +/-  115ms
^+ ntp-nts-2.ps6.canonical.>     2   6    17    52    -27ms[  -45ms] +/-  162ms
^+ ntp-nts-3.ps6.canonical.>     2   6    17    53    -27ms[  -45ms] +/-  151ms
^- ntp-nts-1.ps5.canonical.>     2   6    17    53    +17ms[ -809us] +/-  118ms
FieldMeaning
Reference IDThe server being followed
StratumDistance from a reference clock. Lower is more accurate
System timeDifference from NTP time
^* in chronyc sourcesThe server currently in use. ^+ is a candidate, ^- is excluded

System clock synchronized: yes in timedatectl reports the same thing.

Log Timestamps Follow the Timezone

journalctl converts timestamps into the configured timezone when it prints them. The journal records them in UTC, so --utc shows them unconverted.

Command to print the log in UTC
sudo journalctl --utc
Example: the same log in local time and in UTC
kazulog@sv1:~$ sudo journalctl -u chrony -n 3 --no-pager | cat
Sep 11 08:23:00 sv1 chronyd[1089]: System clock wrong by 1.102775 seconds
Sep 11 08:23:01 sv1 chronyd[1089]: System clock was stepped by 1.102775 seconds
Sep 11 08:23:01 sv1 chronyd[1089]: System clock TAI offset set to 37 seconds
kazulog@sv1:~$ sudo journalctl -u chrony -n 3 --no-pager --utc | cat
Sep 10 23:23:00 sv1 chronyd[1089]: System clock wrong by 1.102775 seconds
Sep 10 23:23:01 sv1 chronyd[1089]: System clock was stepped by 1.102775 seconds
Sep 10 23:23:01 sv1 chronyd[1089]: System clock TAI offset set to 37 seconds

The same events appear nine hours apart. When correlating logs from several servers, be sure which timezone each one is displaying.

Keeping the Server on UTC

Systems spanning several regions are often left on UTC, with conversion done wherever the data is displayed. The same command switches back.

Command to switch to UTC
sudo timedatectl set-timezone UTC
Example: switching to UTC and back to JST
kazulog@sv1:~$ sudo timedatectl set-timezone UTC
kazulog@sv1:~$ date
Thu Sep 10 23:24:17 UTC 2026
kazulog@sv1:~$ sudo timedatectl set-timezone Asia/Tokyo
kazulog@sv1:~$ date
Fri Sep 11 08:24:17 JST 2026
kazulog@sv1:~$ timedatectl show
Timezone=Asia/Tokyo
LocalRTC=no
CanNTP=yes
NTP=yes
NTPSynchronized=yes
TimeUSec=Fri 2026-09-11 08:24:17 JST
RTCTimeUSec=Fri 2026-09-11 08:24:17 JST

timedatectl show prints the settings in a form that is easy to parse, which is useful when a script needs the current timezone.

Setting It at Build Time

The timezone can also be set when the server is built. With cloud-init, one line applies it on first boot. See Automating the Initial Setup with cloud-init.

Setting it in cloud-init
timezone: Asia/Tokyo

Test Environment and Session Logs

The examples were captured on Ubuntu 26.04 LTS Server running on CML. The session log of each step can be downloaded below.

StepSession log
Initial state (UTC)log
The list of timezoneslog
Changing to Asia/Tokyolog
Checking synchronisation (chrony)log
Comparing log timestampslog
Switching to UTC and backlog

Reference

timedatectl(1) - systemd documentation

Related articles

Ubuntu official pages