Skip to content

Date & Time

The Network Time Protocol ( NTP ) is a standard way for machines to provide and obtain correct time information on the Internet.

Use the timedatectl command to show an overview of the current time-related system settings.

Use the timedatectl list-timezones to list the available time zones.

The following timedatectl command updates the current time zone:

timedatectl set-timezone Europe/London

The timedatectl set-ntp command enables or disables NTP synchronization.

The chronyd service keeps the usually-inaccurate local hardware clock (RTC) on track by synchronizing it to the configured NTP servers.

The driftfile specified in the /etc/chrony.conf configuration file records RTC clock drift if network connectivity is lost.

dnf install chrony
systemctl start chronyd

Add servers or pool of servers to /etc/chrony.conf for chrony as a source for chrony to syncronize tie.

Use the chronyc sources -v command to verify NTP servers.

Summary

The chronyd service helps to synchronize time settings with a time source. The time zone of the server can be updated based on its location.

Command References:

timedatectl, chronyd, chrony.conf, chronyc