I've installed the OS and the time is incorrect.
The timedatectl
shows:
System clock synchronized: no
systemd-timesyncd.service active: yes
RTC in local TZ: no
How to force it to sync now?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityFrom man timedatectl
all you need is to enable NTP-sync.
sudo timedatectl set-ntp true
then it do the rest automatically.
If it does not work check status of systemd-timesyncd.service
systemctl status systemd-timesyncd.service
and restart it
sudo systemctl restart systemd-timesyncd.service
And then check again:
$ timedatectl
...
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
systemd-timesyncd.service
was useful - helped to see the problem with the server connectivity.
systemctl
part. Does your firewall allow you to access the NTP servers?
Jul 2, 2019 at 14:18
systemd-timesynd.service
, timedatectl
still reports System clock synchronized: no
. Does anyone know why this would be?
ntp
conflicts with systemd-timesyncd
and wants to remove it. It must be something else. In my case, the error was a typo in the NTP configuration.
It worked for me, when I edited /etc/systemd/timesyncd.conf
, because lines below were commented.
I uncommented them and changed NTP and FallbackNTP lines by my Network servers:
[Time]
NTP=172.24.3.1
FallbackNTP=172.24.44.51
RootDistanceMaxSec=5
PollIntervalMinSec=32
PollIntervalMaxSec=2048
After that, I restarted systemd-timesyncd.service
, so System clock synchronized
status turned to yes