timedatectl Command in Linux: Manage Time, Date, and Time Zone

Wrong system time can break TLS checks, make cron jobs run at the wrong hour, and leave logs with misleading timestamps. On systemd-based Linux systems, timedatectl is the standard tool for checking and changing time settings.
timedatectl is part of systemd and is available on most systemd-based distributions. It handles time zones, NTP synchronization, RTC settings, and manual time adjustments from the command line. This guide explains how to use it with practical examples.
Syntax
timedatectl [OPTIONS] COMMANDWhen called without any arguments, timedatectl shows the current status, which is the same as running timedatectl status.
Check Current Time and Date
Run timedatectl with no arguments to see the full time status:
timedatectl Local time: Tue 2026-04-14 12:00:00 CEST
Universal time: Tue 2026-04-14 10:00:00 UTC
RTC time: Tue 2026-04-14 10:00:00
Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: noThe output shows the local time in your configured time zone, the same moment in UTC, and the hardware clock (RTC) time. System clock synchronized: yes means NTP has synced the clock recently. NTP service: active means systemd-timesyncd (or another NTP daemon) is running and managing synchronization.
If RTC in local TZ shows yes, the hardware clock is set to local time rather than UTC. Most Linux systems keep the hardware clock in UTC, which avoids daylight saving time complications when rebooting.
Set the Time Zone
To set the system time zone, use set-timezone followed by a time zone identifier:
sudo timedatectl set-timezone America/New_YorkAfter running this, timedatectl shows the new time zone immediately. The change persists across reboots.
If you do not know the exact time zone identifier, use list-timezones:
timedatectl list-timezonesThe list is long, so pipe it through grep to filter by region:
timedatectl list-timezones | grep AmericaAmerica/Adak
America/Anchorage
America/Anguilla
America/Antigua
America/Araguaina
America/Argentina/Buenos_Aires
...
America/New_York
...Time zone identifiers follow the Region/City format, such as Europe/Paris, Asia/Tokyo, or Australia/Sydney. For a step-by-step walkthrough, see the guide on how to set or change the time zone in Linux
.
Enable and Disable NTP Synchronization
NTP (Network Time Protocol) keeps the system clock accurate by periodically syncing it against internet time servers. timedatectl can enable or disable NTP management:
sudo timedatectl set-ntp truesudo timedatectl set-ntp falseAfter enabling NTP, run timedatectl to confirm NTP service: active appears in the output.
Turn off NTP before setting the time manually. If NTP is active, timedatectl rejects direct clock changes.
Set the Time and Date Manually
To set the clock manually, you must first disable NTP synchronization:
sudo timedatectl set-ntp falseThen set the time and date using the set-time subcommand. You can provide a full timestamp:
sudo timedatectl set-time '2026-04-15 14:30:00'To set only the time and keep the current date:
sudo timedatectl set-time '14:30:00'To set only the date and keep the current time:
sudo timedatectl set-time '2026-04-15'After setting the time, you can re-enable NTP to let the system sync automatically afterward:
sudo timedatectl set-ntp trueSet the Hardware Clock Mode
The RTC, or hardware clock, can store time in UTC or in local time. Linux systems should normally keep the RTC in UTC because it avoids daylight saving time issues and works better on servers.
To make sure the hardware clock uses UTC, run:
sudo timedatectl set-local-rtc 0If you dual-boot with an operating system that expects the hardware clock to use local time, you can switch the RTC to local time:
sudo timedatectl set-local-rtc 1After changing the RTC mode, run timedatectl again and check the RTC in local TZ line. Use local RTC only when another operating system on the same machine requires it.
Check NTP Synchronization Status
For more detail about the NTP sync, use timesync-status. This subcommand is provided by systemd-timesyncd and shows the current server, offset, and polling interval:
timedatectl timesync-status Server: 185.125.190.56 (ntp.ubuntu.com)
Poll interval: 34min 8s (min: 32s; max 34min 8s)
Leap: normal
Version: 4
Stratum: 2
Reference: 17.253.52.253
Precision: 1us (-19)
Root distance: 19.455ms (max: 5s)
Offset: -2.408ms
Delay: 29.124ms
Jitter: 5.716ms
Packet count: 5Offset is how far your system clock drifted before the last sync. A small offset, under a few hundred milliseconds, is normal. A large offset can point to network problems or a misconfigured time source.
timesync-status only works when systemd-timesyncd is handling NTP. If your system uses a different NTP daemon such as chrony or ntpd, check its own status commands instead.
Machine-Parseable Output
The show subcommand prints the same information as status in a key-value format that is easier to parse in scripts:
timedatectl showTimezone=Europe/Berlin
LocalRTC=no
CanNTP=yes
NTP=yes
NTPSynchronized=yes
TimeUSec=Tue 2026-04-14 10:00:00 UTC
RTCTimeUSec=Tue 2026-04-14 10:00:00 UTCPass --property to extract a single value:
timedatectl show --property=Timezone --valueEurope/BerlinThis is useful in automation and configuration management scripts where you need to check the current time zone without parsing the human-readable status output.
For timesync details in key-value format, use show-timesync:
timedatectl show-timesyncThis gives scripts access to systemd-timesyncd properties such as the current server name, poll interval, and root distance.
timedatectl Options
--no-ask-password- Do not prompt for authentication; use the invoking user’s credentials--adjust-system-clock- When setting the RTC, also adjust the system clock accordingly--no-pager- Print output without piping through a pager-p NAME,--property=NAME- Show one named property fromshowoutput-H ADDR,--host=ADDR- Execute the command on a remote host over SSH-M MACHINE,--machine=MACHINE- Execute the command inside a local container
Quick Reference
For a printable quick reference, see the timedatectl cheatsheet .
| Command | Description |
|---|---|
timedatectl | Show current time, time zone, and NTP status |
timedatectl show | Show status in key-value format (script-friendly) |
timedatectl list-timezones | List all available time zone identifiers |
sudo timedatectl set-timezone TZ | Set the time zone (e.g., America/New_York) |
sudo timedatectl set-ntp true | Enable NTP synchronization |
sudo timedatectl set-ntp false | Disable NTP synchronization |
sudo timedatectl set-time 'YYYY-MM-DD HH:MM:SS' | Set time and date manually (NTP must be off) |
sudo timedatectl set-local-rtc 0 | Store the hardware clock in UTC |
timedatectl timesync-status | Show NTP sync detail from systemd-timesyncd |
timedatectl show-timesync | Show NTP sync detail in key-value format |
timedatectl show --property=Timezone --value | Print the current time zone name only |
Troubleshooting
Failed to set time: Automatic time synchronization is enabled
NTP is active and has locked the clock. Disable NTP first with sudo timedatectl set-ntp false, then run your set-time command.
Failed to set time: Access denied
You need administrator privileges. Prepend sudo to the command.
Failed to connect to bus: No such file or directorytimedatectl communicates with systemd-logind over D-Bus. This error usually appears in minimal containers or chroot environments where systemd is not running. In those cases, set the time directly with the date
command: sudo date -s '2026-04-15 14:30:00'.
timesync-status returns Failed to query server: Unit dbus-org.freedesktop.timesync1.service not foundsystemd-timesyncd is not installed or not running. If your system uses chrony or ntpd instead, check their status with chronyc tracking or ntpq -p.
FAQ
What is the difference between timedatectl and the date command?date
reads and formats timestamps, and it can set the system clock with sudo date -s. timedatectl is the systemd tool that also manages time zones, the RTC, and NTP synchronization. On systemd-based systems, use timedatectl for time configuration and date for formatting timestamps.
Does timedatectl work on non-systemd distributions?
No. timedatectl is part of systemd and requires systemd-logind and D-Bus to be running. On systems without systemd (such as Alpine Linux with OpenRC), use the date command and edit /etc/localtime or /etc/timezone directly.
How do I check which NTP servers the system is using?
Run timedatectl timesync-status to see the current NTP server. To see the full list of configured servers, check /etc/systemd/timesyncd.conf. The NTP= and FallbackNTP= lines list the configured time servers.
How do I view historical time changes in system logs?timedatectl itself does not keep a history, but the system journal does. Search for time-related events with:
journalctl -u systemd-timesyncdFor more on reading system logs, see the journalctl guide .
Conclusion
For day-to-day administration, timedatectl is usually enough to check the current time settings, switch time zones, toggle NTP, and inspect RTC behavior. If you need distribution-specific time zone steps, see the guide on how to set or change the time zone in Linux
.
Tags
Linuxize Weekly Newsletter
A quick weekly roundup of new tutorials, news, and tips.
About the authors

Dejan Panovski
Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.
View author page