timedatectl: Check Linux Server Time Sync Status and Set the Time Zone
timedatectl is a systemd command that checks and changes the system clock, time zone, and NTP time synchronization status of a Linux server. When the time sync status was checked on an AlmaLinux 9 server that uses chrony and a Debian 12 server that uses ntpsec, both servers had their clocks synchronized, but the NTP service line showed active on one and n/a on the other.
The outputs below are results from running the commands on the two servers. Only host names, IP addresses, and package version numbers were replaced with example values, and commands that change the time or time zone were not run on the production server.
1️⃣ timedatectl Usage and Checking the Linux Server Time
Running timedatectl without options gives the same result as adding status. The time of the system clock and the hardware clock (RTC), the time zone, and the sync status are gathered on one screen. Below is the result on the Debian 12 server.
timedatectl Local time: Wed 2026-10-28 19:49:57 UTC
Universal time: Wed 2026-10-28 19:49:57 UTC
RTC time: Wed 2026-10-28 19:49:57
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: noThe Debian 12 server's time zone is Etc/UTC, so Local time and Universal time showed the same time. What each line tells you and the results from the two servers are in the table below.
| Output line | What it shows | Results from the two servers and what to check |
|---|---|---|
| Local time | Current time of the system clock with the time zone applied | Changing the time zone changes only this line and the date output to the new zone |
| Universal time | The same time expressed in UTC | Stays the same when the time zone changes — on the Debian 12 server (Etc/UTC) it equals Local time |
| RTC time | Time of the hardware clock (RTC) | Shown without a time zone — UTC time when RTC in local TZ is no |
| Time zone | Configured time zone, its abbreviation, and offset from UTC | Use a name from the list-timezones list when changing it |
| System clock synchronized | Whether the kernel considers the clock synchronized | yes on both servers — if no, check the reference server first with chronyc tracking or ntpq -p |
| NTP service | Whether the sync service that timedatectl turns on and off is running | active on AlmaLinux 9 (chrony), n/a on Debian 12 (ntpsec) — n/a means the service is unknown to timedatectl, so check it with systemctl |
| RTC in local TZ | Whether the hardware clock is kept in local time (no = UTC) | no on both servers — the command to switch yes to UTC is set-local-rtc 0 |
Linux has two clocks. The system clock is kept by the kernel after boot, and the hardware clock is the motherboard clock that keeps time even while the server is powered off.
Read the hardware clock directly with hwclock. hwclock prints the time converted to the current time zone. On the AlmaLinux server, reading it with TZ=UTC in front of the command returned a UTC time ending in +00:00.
TZ=UTC hwclock --show2026-10-28 19:53:33.006788+00:00On the Debian 12 server, accessed with a regular user account, the same command ended without being able to access the hardware clock.
/usr/sbin/hwclock --showhwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.The RTC in local TZ line is the same setting as the third line of the /etc/adjtime file. On the AlmaLinux server the third line was UTC, which means the hardware clock is kept in UTC.
cat /etc/adjtime0.0 0 0.0
0
UTCUse show instead of status when reading values in a script. On the Debian 12 server, it prints the same information as name=value, one per line.
timedatectl showTimezone=Etc/UTC
LocalRTC=no
CanNTP=no
NTP=no
NTPSynchronized=yes
TimeUSec=Wed 2026-10-28 19:49:57 UTC
RTCTimeUSec=Wed 2026-10-28 19:49:57 UTCPick properties with -p and add --value to keep only the values without names. Use this form to pull out just the time zone name.
timedatectl show -p Timezone --valueEtc/UTC🔲 timedatectl Command Simulator
In the simulator below, you can type commands to check the time, list time zones, change the time zone, and check sync with chronyc.
2️⃣ Linux Server Time Synchronization Status
The System clock synchronized line shows whether the kernel considers the clock synchronized, and the NTP service line shows whether the sync service that timedatectl can turn on and off is running. With show, the same values appear as NTPSynchronized and NTP, and CanNTP shows whether there is a sync service that can be turned on and off.
On the AlmaLinux 9 server using chrony, all three values were yes.
timedatectl show -p CanNTP -p NTP -p NTPSynchronizedCanNTP=yes
NTP=yes
NTPSynchronized=yesOn the Debian 12 server, which keeps time with ntpsec, only NTPSynchronized was yes, and CanNTP and NTP were no. That is why the NTP service line showed n/a on this server's status screen.
timedatectl show -p CanNTP -p NTP -p NTPSynchronizedCanNTP=no
NTP=no
NTPSynchronized=yesThe ntpsec service itself was running.
systemctl is-active ntpsecactiveThe only sync services timedatectl knows are those listed in the list files in the ntp-units.d folder, and distribution packages put these files in /usr/lib/systemd/ntp-units.d/ (per the official manual). The AlmaLinux 9 server had a list file installed by the chrony package, containing a single line, chronyd.service.
cat /usr/lib/systemd/ntp-units.d/50-chronyd.listchronyd.servicerpm -qf /usr/lib/systemd/ntp-units.d/50-chronyd.listchrony-4.8-10.el9.x86_64The Debian 12 server did not have this folder. Since ntpsec is not in the list, timedatectl knew the clock was synchronized but could not turn that service on or off.
ls /usr/lib/systemd/ntp-units.d/ls: cannot access '/usr/lib/systemd/ntp-units.d/': No such file or directory3️⃣ Checking Time Sync with chronyc
On a server using chrony, check which time server the clock follows with chronyc. sources prints the time servers chronyd is querying and their state, one per line.
chronyc sourcesMS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^- 192.0.2.10 2 10 377 943 +272us[ +275us] +/- 55ms
^- ntp1.example.com 2 10 377 80 -28us[ -32us] +/- 3655us
^- 198.51.100.33 3 10 257 384 -151us[ -156us] +/- 97ms
^- 198.51.100.82 3 10 177 532 +157us[ +149us] +/- 45ms
^* 192.0.2.123 3 4 377 2 -21us[ -23us] +/- 312usThe leading ^ marks a time server, a * as the second character marks the reference server the clock currently follows, and - marks a candidate not combined in the calculation. Poll 4 on the reference server means it is queried every 16 seconds (2 to the 4th power), and Reach 377 means all of the last eight responses were received.
tracking prints how far the system clock is off from the reference server's time.
chronyc trackingReference ID : C000027B (192.0.2.123)
Stratum : 4
Ref time (UTC) : Wed Oct 28 19:50:21 2026
System time : 0.000002422 seconds slow of NTP time
Last offset : -0.000002098 seconds
RMS offset : 0.000000981 seconds
Frequency : 6.348 ppm slow
Residual freq : -0.001 ppm
Skew : 0.017 ppm
Root delay : 0.000300815 seconds
Root dispersion : 0.000150780 seconds
Update interval : 16.3 seconds
Leap status : NormalThe System time line shows the system clock was 0.000002422 seconds behind NTP time, and Leap status was Normal. An Update interval of 16.3 seconds is the interval between the last two clock updates.
Which servers are queried is set by the pool and server lines in /etc/chrony.conf. Leaving only the setting lines, without comments and blank lines, gives the following.
grep -v "^#" /etc/chrony.conf | grep -v "^$"pool 2.almalinux.pool.ntp.org iburst
sourcedir /run/chrony-dhcp
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
keyfile /etc/chrony.keys
ntsdumpdir /var/lib/chrony
leapsectz right/UTC
logdir /var/log/chrony
server 192.0.2.123 prefer iburst minpoll 4 maxpoll 4The pool line queries the AlmaLinux NTP pool, and prefer on the last server line is an option that makes chronyd pick this server before the others. makestep 1.0 3 is a setting that, for the first three updates after chronyd starts, corrects a clock off by more than 1 second in one step, and after that adjusts the clock gradually by running it slightly faster or slower. rtcsync makes the kernel copy the system time to the hardware clock every 11 minutes (per the official documentation).
On the Debian 12 server using ntpsec, the same information was checked with ntpq -p. The leading * is the reference server, and all three servers were being queried every 1024 seconds.
ntpq -p remote refid st t when poll reach delay offset jitter
===============================================================================
+203.0.113.43 198.51.100.28 2 u 835 1024 377 184.6893 -0.1018 1.4879
+203.0.113.44 198.51.100.27 2 u 547 1024 377 183.0827 -2.4227 4.0957
*ntp2.example.co 198.51.100.40 2 u 440 1024 377 177.4670 -0.5814 1.70704️⃣ Changing the Time Zone with timedatectl
Check time zone names with list-timezones. Most names are in Continent/City form, one per line, and both servers had 598.
timedatectl list-timezones | head -5Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmaratimedatectl list-timezones | wc -l598The list is long, so filter it with grep when looking for a name.
timedatectl list-timezones | grep -i new_yorkAmerica/New_YorkChange the time zone by giving a name from the list after set-timezone. This command replaces the /etc/localtime link with the new time zone file, so run it with sudo from a regular account.
sudo timedatectl set-timezone America/New_YorkCheck with ls -l whether /etc/localtime is a link to a time zone file.
ls -l /etc/localtimelrwxrwxrwx 1 root root 27 Sep 24 12:52 /etc/localtime -> /usr/share/zoneinfo/Etc/UTCA name not in the list was rejected right away, before the time zone was changed.
timedatectl set-timezone Mars/OlympusFailed to set time zone: Invalid or not installed time zone 'Mars/Olympus'Changing the time zone leaves the system clock's time as it is, and only Local time and the output of the date command appear in the new zone. On a server that keeps the hardware clock in UTC, the hardware clock does not change either (per the official manual).
5️⃣ Turning On NTP and Setting the Time Manually with timedatectl
set-ntp true starts the first service in the sync service list and enables it at boot. false stops the services in the list and disables them at boot (per the official manual).
sudo timedatectl set-ntp trueOn the Debian 12 server, which has no list file, the command ended with NTP not supported even when given false, the current value. A service not in the list, such as ntpsec, is started and stopped directly with systemctl.
timedatectl set-ntp falseFailed to set ntp: NTP not supportedTo set the time manually, give the date and time after set-time. This command sets the hardware clock along with the system clock.
sudo timedatectl set-time '2026-10-28 20:00:00'On the Debian 12 server, entering a value in the wrong format ended with an error without changing the time.
timedatectl set-time badFailed to parse time specification 'bad': Invalid argumentOn a server using chrony, use chronyc makestep to correct a clock that is far off in one step.
sudo chronyc makestepmakestep drops the remaining difference that was being corrected gradually and makes the system clock jump by that amount at once. The official documentation warns that a sudden time change can affect some software, so use it only when the clock is too far off to correct slowly.
🔢 FAQ & Recommended Content
Settings · locale
[Linux] localectl command
The localectl command checks and changes the system language (locale) and keyboard layout.
System Info
Linux uptime Command (Checking Server Uptime & 1, 5, 15-Minute Load Averages)
The uptime command checks how long the server has been running and the 1-, 5-, and 15-minute load averages.
Service management
Apache Start, Stop and Restart: Commands and the graceful Difference
Commands to start, stop, and restart Apache and check the service status on Red Hat family systems and Ubuntu.
ℹ️ Affiliate Disclosure
This site's content contains affiliate links. When a visitor buys a product or service through one of them, the site receives a commission from the seller. The amount the buyer pays(it goes down during event discounts ↓)does not go up. Posted prices, discounts, and stock reflect the time of writing and may differ, so confirm with the seller before buying. Products are chosen and reviewed by our own standards, and commissions do not affect the order or content of reviews.