Network Time Protocol (NTP) automatically synchronizes the system time of the RevPi with a time server.
Synchronization is handled by the systemd-timesyncd service.
Active NTP synchronization ensures:
-
accurate timestamps in logs
-
correct execution of time-controlled processes
-
automatic correction of the system time
Checking NTP Status #
Using timedatectl, you can display the current synchronization status.
▷ Log in to the RevPi via a terminal.
▷ Check the current settings:
timedatectl status
Enabling NTP #
▷ Enable NTP synchronization:
timedatectl set-ntp true
Alternatively, synchronization can be enabled via Cockpit.
If you want to disable NTP synchronization, see Configuring the RTC without NTP Synchronization.
Configuring a Custom NTP Server #
▷ Open the configuration file:
sudo nano /etc/systemd/timesyncd.conf
▷ Replace the NTP= entry by the IP address of the desired NTP server, e.g.:
NTP=172.16.59.134
▷ Save the file and close the editor.
▷ Restart the service:
sudo systemctl restart systemd-timesyncd
Correcting a Large Time Offset #
If the system time differs significantly from the actual time, synchronization may fail.
▷ Disable NTP synchronization:
timedatectl set-ntp false
▷ Set the time manually to an approximate value:
timedatectl set-time "YYYY-MM-DD HH:MM:SS"
▷ Enable NTP synchronization again:
timedatectl set-ntp true
Troubleshooting #
| Problem | Cause | Solution |
|---|---|---|
Time is not synchronized. |
NTP disabled. |
Enable NTP: |
|
No connection to the NTP server. |
Check the network connection and the NTP server. |
Time remains incorrect. |
Large time offset prevents synchronization. |
Approximate the time manually and enable NTP again: |
NTP service is not running. |
Service stopped or faulty. |
Check status: |
Custom NTP server is not used. |
Configuration not applied. |
Restart the service: |