0

In my Linux distribution is enabled the service systemd-timesyncd.service.

Below it is shown the /etc/systemd/timesyncd.conf file (see this post for find the following command):

[Time]
#NTP=
#FallbackNTP=time1.google.com time2.google.com time3.google.com time4.google.com
#RootDistanceMaxSec=5
PollIntervalMinSec=32
#PollIntervalMaxSec=2048

and below I show the commands sequence that I need to understand:

####### stop synchronization with NTP server
$ timedatectl set-ntp false

####### Set tha datetime in the past
$ timedatectl set-time "2022-09-29 00:00:00"

####### restart synchronization with NTP server
$ timedatectl set-ntp true

###### immediately execution of the following command
$ date

The last command date (immediately executed after command timedatectl set-ntp true) gives the date and time already synchronized with the NTP Server.

Instead I had assumed that with the setting PollIntervalMinSec = 32 (see timesyncd.conf file) the NTP server is contacted after at least 32 seconds, but obviously this is not true.

Someone can help me to find the parameter of the /etc/systemd/timesyncd.conf file that can set the delay before to connect the NTP server?

Thank you

frankfalse
  • 125
  • 9
  • You may be confusing the normal polling interval with a change that causes an immediate synchronization. With no changes, it polls on the regular interval, but any change causes an immediate synchronization. – Ron Maupin Sep 29 '22 at 16:21
  • Thanks @RonMaupin. I thought the same thing too but I was not sure. With the service `systemd-timesyncd` active if I change the date, immediately the NTP server is contacted and the date time are synchronized. The change of date is a trigger for the service. – frankfalse Sep 29 '22 at 16:37

0 Answers0