Updated: 28 September 2026 · Applies to: systemd 252 to 259 (timedatectl) on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13
timedatectl shows and sets the system clock, the time zone and automatic time synchronisation (NTP) in one tool. It replaces the separate date, hwclock and /etc/localtime steps of older guides.
1. See the current settings
timedatectl
The output shows local time, UTC, the real-time clock (RTC), the time zone, whether the clock is synchronised, and whether the NTP service is active.
2. Set the time zone
- Find the name of your zone:
timedatectl list-timezones | grep -i kolkata
- Set it:
timedatectl set-timezone Asia/Kolkata
Servers are often left on UTC, which avoids daylight-saving jumps in logs and cron jobs. Choose one policy for all your servers.
3. Keep the time right automatically (NTP)
timedatectl set-ntp true
This switches on the installed time service: chrony on AlmaLinux, Rocky Linux, RHEL and Ubuntu 26.04, systemd-timesyncd on Ubuntu 24.04 and Debian 13. Check with timedatectl: System clock synchronized: yes. If "NTP service" shows n/a, no time service is installed; see how to synchronize time with NTP on Linux.
4. Set the date and time by hand
Only needed on a server without network time. Switch NTP off first, or it rejects the change:
timedatectl set-ntp false timedatectl set-time "2026-09-28 14:30:00" timedatectl set-time 14:30:00 # time only
5. The hardware clock (RTC)
Linux servers should keep the hardware clock in UTC. timedatectl warns if it is set to local time. To switch it back to UTC:
timedatectl set-local-rtc 0
Only dual-boot machines with Windows sometimes need local time in the RTC.
Common problems
- "Failed to set time: Automatic time synchronization is enabled": run
timedatectl set-ntp falsefirst, as in step 4. - Cron jobs run an hour off after a zone change: restart cron (
systemctl restart crondon AlmaLinux, Rocky Linux and RHEL,systemctl restart cronon Ubuntu and Debian) and any service that caches the zone. - In a container: the clock belongs to the host; only the time zone can be set inside the container.
Official documentation: timedatectl.