systemd-timedated.service
Manage system's date, time, and timezone
SYNOPSIS
systemd-timedated.service is a systemd service unit and is not directly executed by users from the command line. Instead, it is managed by the systemctl utility.
To manage the service's lifecycle:
sudo systemctl [start|stop|enable|disable|status|restart] systemd-timedated.service
The actual daemon executed by this service unit is timedated, which runs in the background and exposes its functionality via D-Bus.
PARAMETERS
N/A (Service Unit)
systemd-timedated.service is a systemd service unit and does not accept command-line parameters directly from the user. Its behavior and configuration are managed internally by systemd or through D-Bus calls from client applications like timedatectl. The underlying timedated daemon, when invoked by systemd, also typically runs without user-supplied command-line arguments.
DESCRIPTION
systemd-timedated.service is a core systemd service unit designed to manage the system's time and date settings. It provides a D-Bus interface, allowing other system components and user utilities to query and modify the system clock, time zone, and the hardware-based Real Time Clock (RTC). This service is crucial for maintaining accurate time across reboots and ensuring proper synchronization, especially when combined with Network Time Protocol (NTP) clients.
It abstracts the complexities of directly interacting with kernel time interfaces and RTC hardware, offering a unified and consistent API for time management. Users do not typically run systemd-timedated.service directly as a command; instead, they interact with its functionalities through the timedatectl command-line utility. timedatectl sends D-Bus messages to the timedated daemon (which is the actual executable run by this service) to perform operations like setting the timezone, enabling NTP synchronization, or adjusting the RTC.
CAVEATS
- Systemd Dependency: This service is an integral part of the systemd ecosystem and is only available on Linux distributions that use systemd as their init system.
- D-Bus Communication: Its functionality relies entirely on D-Bus for inter-process communication, meaning the D-Bus system must be operational.
- Privilege Requirement: Modifying system time, timezone, or RTC settings via clients like timedatectl typically requires root privileges.
- NTP Client Coordination: While systemd-timedated.service can enable NTP synchronization (usually through systemd-timesyncd.service), direct manual time adjustments might conflict if another dedicated NTP client (e.g., ntpd, chronyd) is actively managing time.
INTERACTION WITH TIMEDATECTL
The primary way users interact with the functionality provided by systemd-timedated.service is through the timedatectl command. timedatectl acts as a client, sending D-Bus messages to the timedated daemon (run by this service) to query status or apply changes.
Examples:
timedatectl status - Shows current time and date settings.
timedatectl set-time "YYYY-MM-DD HH:MM:SS" - Sets the system time.
timedatectl set-timezone Europe/Berlin - Sets the system timezone.
timedatectl set-ntp true - Enables NTP synchronization (often via systemd-timesyncd.service).
RTC (REAL TIME CLOCK) MANAGEMENT
systemd-timedated.service plays a crucial role in managing the system's Real Time Clock (RTC), which is a hardware clock that maintains time even when the system is powered off. It ensures consistency between the system clock (which is software-based) and the RTC, handling configurations for whether the RTC should be kept in UTC or local time to prevent time discrepancies after system reboots.
SERVICE UNIT FILE LOCATION
The definition of the systemd-timedated.service unit is typically found in the `/usr/lib/systemd/system/` or `/lib/systemd/system/` directory. This unit file specifies how the service is started, the path to its executable (usually `/usr/lib/systemd/systemd-timedated`), its dependencies, and other systemd-specific operational parameters.
HISTORY
systemd-timedated.service emerged as part of the broader systemd initiative, which began development around 2010. Prior to systemd, time and date management on Linux systems was often handled by disparate utilities and scripts (e.g., hwclock for RTC, direct manipulation of `/etc/localtime` for timezone, and separate daemons for NTP synchronization). Systemd aimed to centralize and unify these critical system management tasks. timedated was introduced to provide a robust, consistent, and programmatic D-Bus API for handling time, date, and RTC settings, replacing the fragmented approaches and leading to more predictable system behavior in modern Linux distributions.
SEE ALSO
timedatectl(1), systemctl(1), systemd(1), localtime(5), systemd-timesyncd.service(8), ntpd(8), chronyd(8)