All articles

Check Linux time synchronization

4 minutes read


Linux publication

Share this article

𝕏✉

Illustration for Check Linux time synchronization

“The time is wrong” can mean the clock is unsynchronized, the time zone is wrong, an application formats UTC unexpectedly, or the active NTP client has lost its sources. Check those layers separately before changing the clock.

Read the system view

timedatectl status
timedatectl show \
  -p Timezone \
  -p LocalRTC \
  -p NTPSynchronized

timedatectl reports the local and universal time, time zone, RTC mode, and whether network time synchronization is active. NTPSynchronized=yes is a useful summary, but it does not tell you which source is healthy or how large the current offset is.1

Compare UTC and local formatting directly:

date --iso-8601=seconds
date --utc --iso-8601=seconds

If UTC is correct and only the displayed local time is wrong, investigate the configured time zone before blaming NTP.

If systemd-timesyncd is active

timedatectl timesync-status
systemctl status systemd-timesyncd.service
journalctl -b -u systemd-timesyncd.service --no-pager

systemd-timesyncd synchronizes the local clock with remote NTP servers and records synchronization state. The status view exposes the selected server and timing data supported by the service.12

If chrony is active

chronyc tracking
chronyc sources -v
chronyc sourcestats -v

tracking summarizes the system clock’s relationship to the selected reference. sources shows selection state and reachability; sourcestats shows measurements used to estimate source quality.3

Look for a selected source, a nonzero reachability history, and offsets that converge rather than grow. One unreachable source is not necessarily an incident when other configured sources remain healthy.

Follow the service that owns NTP

systemctl list-units --type=service \
  | grep -E 'chrony|timesync|ntp'

Do not run several time clients against the same clock unless the setup explicitly coordinates them. Check DNS, UDP reachability, firewall policy, and server configuration from the active client’s logs.

Large corrections may be stepped while small ones are slewed gradually, depending on the client and policy. That behavior is intentional because sudden time jumps can disrupt databases, authentication, leases, and distributed logs.

[!CAUTION] Do not use date --set or timedatectl set-time on a production host as a first response. Preserve the offset and source evidence, then fix synchronization ownership or reachability.

Sources and further reading
  1. timedatectl
  2. systemd-timesyncd
  3. chronyc