Date & time
Notes// archive From the original Code Walker docs. Kept for reference, so some versions and commands may be out of date.
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/LondonThe 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 chronydAdd 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