Date and time wont sync correctly

hello!

im using zorin os core. i left my computer untouched for some days - about 20 days - and when turning it up ive noticed time was a bit off from my other devices, about 5 minutes ahead.

went to time and date, unmarked the auto-sync option then turned it on again. no change. weird because my computer was the only one showing a different time.

so i set it to manual again and entered "the correct time".

later, ive came back and tried the automatic option again. no change. at all. ok, but weird since the time i input manually shouldnt be that accurate.

then i noticed that:

if now is, lets say, 11:40 am, and i manually enter 11:55 am, if i turn the time sync on, it will show 11:55 am; it wont go back to 11:40 am.

going manual again and entering 11:39 am, then, turning the auto-sync, the clock will go to 11:55 am - even with the correct time being 11:40 am.

setting manually, then, to 11:59 am (while it should be 11:41 at most), then turning auto-sync back on will get me with the clock now showing 11:59 am.

SO, auto-date and time is showing me whatever time i enter manually which has a higher value, time-wise.

its a core i5 computer with only zorin os core installed.

check this by typing timedatactl in your terminal for verification
It says: System clock synchronized: yes
but it says System clock synchronized: no. This is a problem.
verify this other comand too: systemctl status systemd-timesyncd
If it says "failed" or "inactive," it's a problem.
This can be solved using this command in your terminal: sudo systemctl enable systemd-timesyncd --now
sudo systemctl restart systemd-timesyncd

Welcome to the Forum!

It is timedatectl

@xdiegox: Welcome to the Forum, too! Do You have a VPN enabled?

thank you all for your replies and welcoming.

no, im not on a vpn.

heres the output from timedatectl:

               Local time: qua 2025-12-17 15:53:31 -03
           Universal time: qua 2025-12-17 18:53:31 UTC
                 RTC time: qua 2025-12-17 18:53:32
                Time zone: America/Sao_Paulo (-03, -0300)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

its the same for both automatic or manual date & time.

Because of that:

You could try it with that what @skourge has suggested:

Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; preset: enabled)
     Active: active (running) since Wed 2025-12-17 15:53:03 -03; 50min ago
       Docs: man:systemd-timesyncd.service(8)
   Main PID: 18295 (systemd-timesyn)
     Status: "Idle."
      Tasks: 2 (limit: 18760)
     Memory: 1.3M (peak: 2.1M)
        CPU: 44ms
     CGroup: /system.slice/systemd-timesyncd.service
             └─18295 /usr/lib/systemd/systemd-timesyncd

dez 17 16:04:19 ead-OptiPlex-5070 systemd-timesyncd[18295]: Timed out waiting for reply from 185.125.190.56:123 (ntp.ubuntu.com).
dez 17 16:04:29 ead-OptiPlex-5070 systemd-timesyncd[18295]: Timed out waiting for reply from 185.125.190.57:123 (ntp.ubuntu.com).
dez 17 16:13:11 ead-OptiPlex-5070 systemd-timesyncd[18295]: Timed out waiting for reply from 91.189.91.157:123 (ntp.ubuntu.com).
dez 17 16:13:22 ead-OptiPlex-5070 systemd-timesyncd[18295]: Timed out waiting for reply from 185.125.190.56:123 (ntp.ubuntu.com).
dez 17 16:13:32 ead-OptiPlex-5070 systemd-timesyncd[18295]: Timed out waiting for reply from 185.125.190.58:123 (ntp.ubuntu.com).
dez 17 16:13:42 ead-OptiPlex-5070 systemd-timesyncd[18295]: Timed out waiting for reply from 185.125.190.57:123 (ntp.ubuntu.com).
dez 17 16:30:57 ead-OptiPlex-5070 systemd-timesyncd[18295]: Timed out waiting for reply from 91.189.91.157:123 (ntp.ubuntu.com).
dez 17 16:31:07 ead-OptiPlex-5070 systemd-timesyncd[18295]: Timed out waiting for reply from 185.125.190.56:123 (ntp.ubuntu.com).
dez 17 16:31:17 ead-OptiPlex-5070 systemd-timesyncd[18295]: Timed out waiting for reply from 185.125.190.58:123 (ntp.ubuntu.com).
dez 17 16:31:27 ead-OptiPlex-5070 systemd-timesyncd[18295]: Timed out waiting for reply from 185.125.190.57:123 (ntp.ubuntu.com).

"timedatectl" after "sudo systemctl enable systemd-timesyncd --now" and "sudo systemctl restart systemd-timesyncd":

Local time: qua 2025-12-17 16:46:24 -03
           Universal time: qua 2025-12-17 19:46:24 UTC
                 RTC time: qua 2025-12-17 19:46:25
                Time zone: America/Sao_Paulo (-03, -0300)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

So the service is running but the server response is timing out. This could either be because of the firewall settings blocking the outgoing connections to that server, or because the server itself is down. We'd see a lot more issues like this if the server was the problem, though. Have you set up any firewall rules?


Let's also take a look at the current configuration with the command: timedatectl show-timesync --all

You may need to specify a different server than what comes by default.

i didnt open firewall settings since... hmmm... i didnt open it at all, in fact.

its turned off by default. and im letting it this way for now.

"timedatectl show-timesync --all" returned:

LinkNTPServers=
SystemNTPServers=
RuntimeNTPServers=
FallbackNTPServers=ntp.ubuntu.com
ServerName=ntp.ubuntu.com
ServerAddress=2620:2d:4000:1::40
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=34min 8s
Frequency=0
ead@ead-OptiPlex-5070:~$ 

It was a long shot, to be honest. The default firewall rules should allow outgoing traffic anyway, but it's always a good idea to check.

What's the output of running: ping -c 5 ntp.ubuntu.com ? That would try to contact that server 5 times.

When I use the Command it gaves me this:

LinkNTPServers=
SystemNTPServers=
RuntimeNTPServers=
FallbackNTPServers=ntp.ubuntu.com
ServerName=ntp.ubuntu.com
ServerAddress=2620:2d:4000:1::41
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=34min 8s
NTPMessage={ Leap=0, Version=4, Mode=4, Stratum=2, Precision=-25, RootDelay=961us, RootDispersion=396us, Reference=B7A08584, OriginateTimestamp=Thu 2025-12-18 11:35:56 CET, ReceiveTimestamp=Thu 2025-12-18 11:35:56 CET, TransmitTimestamp=Thu 2025-12-18 11:35:56 CET, DestinationTimestamp=Thu 2025-12-18 11:35:56 CET, Ignored=no, PacketCount=7, Jitter=5.384ms }
Frequency=554279

You don't have NTPMessage and Frequeny is set to 0 ...

PING ntp.ubuntu.com (185.125.190.57) 56(84) bytes of data.
64 bytes from prod-ntp-4.ntp4.ps5.canonical.com (185.125.190.57): icmp_seq=1 ttl=47 time=214 ms
64 bytes from prod-ntp-4.ntp4.ps5.canonical.com (185.125.190.57): icmp_seq=2 ttl=47 time=213 ms
64 bytes from prod-ntp-4.ntp4.ps5.canonical.com (185.125.190.57): icmp_seq=3 ttl=47 time=213 ms
64 bytes from prod-ntp-4.ntp4.ps5.canonical.com (185.125.190.57): icmp_seq=4 ttl=47 time=214 ms
64 bytes from prod-ntp-4.ntp4.ps5.canonical.com (185.125.190.57): icmp_seq=5 ttl=47 time=213 ms

--- ntp.ubuntu.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4004ms
rtt min/avg/max/mdev = 213.127/213.416/213.934/0.308 ms

The ping seems to work fine, and it resolves the domain name of the server correctly. I wonder if maybe the issue is with IPv6 being used by default. But that could also be an issue on the server side.

Let's try to update the NTP servers instead. It's a few commands in a terminal window but it should be easy enough to do:

  1. Create a new directory to include the configuration files to override the defaults:

    sudo mkdir /etc/systemd/timesyncd.conf.d
    
  2. Create a new configuration file in this new location. The name of the file doesn't actually matter but since it will only override the ntp servers, it's best to give it a proper name to help identify it later. It should also end with a .conf extension.

    sudo nano /etc/systemd/timesyncd.conf.d/ntp-servers.conf
    
  3. The nano command is actually a terminal-based text editor. A little archaic but it's the easiest option for editing configuration files locked down by admin permissions. It's only a couple of lines so it should be easy enough — you can copy and paste it directly:

    NOTE: To paste text into a terminal window the keyboard shortcut is Ctrl+Shift+V.

    [Time]
    NTP=0.south-america.pool.ntp.org 1.south-america.pool.ntp.org 2.south-america.pool.ntp.org 3.south-america.pool.ntp.org
    

    To save the changes, press Ctrl+O, and exit the text editor with Ctrl+X.

    Feel free to change the servers with any from the NTP Pool Project. It helps to keep things somewhat generic, so even though there are servers located in Brazil you might want to use regional servers.

  4. Finally, restart the service and let's see if there's any luck.

    sudo systemctl systemd-timesyncd
    

    You might want to restart the computer altogether, just in case.

thank you for your help and sorry in my delay. things got complicated around here as were nearing the holydays.

all done.

i usually use shift + insert to paste things in terminal.

it returned:

Unknown command verb 'systemd-timesyncd'.

restarted and tried "timedatectl":

Local time: seg 2025-12-22 11:55:25 -03
           Universal time: seg 2025-12-22 14:55:25 UTC
                 RTC time: seg 2025-12-22 14:55:26
                Time zone: America/Sao_Paulo (-03, -0300)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

Hi there, sorry for the delay and happy holidays!

That's my bad, and a mistake I make a lot more often than I should :joy: The actual command is sudo systemctl restart systemd-timesyncd... Please try again with that, and see if that makes any difference.

it worked!

thank you all for your help and time!

EDIT:

as this forum only allows one post to be marked as a solution, ill requote it all here:

solution credit to @zenzen

Let's try to update the NTP servers instead. It's a few commands in a terminal window but it should be easy enough to do:

  1. Create a new directory to include the configuration files to override the defaults:
sudo mkdir /etc/systemd/timesyncd.conf.d
  1. Create a new configuration file in this new location. The name of the file doesn't actually matter but since it will only override the ntp servers, it's best to give it a proper name to help identify it later. It should also end with a .conf extension.
sudo nano /etc/systemd/timesyncd.conf.d/ntp-servers.conf
  1. The nano command is actually a terminal-based text editor. A little archaic but it's the easiest option for editing configuration files locked down by admin permissions. It's only a couple of lines so it should be easy enough — you can copy and paste it directly:
    NOTE: To paste text into a terminal window the keyboard shortcut is Ctrl+Shift+V.
[Time]
NTP=0.south-america.pool.ntp.org 1.south-america.pool.ntp.org 2.south-america.pool.ntp.org 3.south-america.pool.ntp.org

To save the changes, press Ctrl+O, and exit the text editor with Ctrl+X.Feel free to change the servers with any from the NTP Pool Project. It helps to keep things somewhat generic, so even though there are servers located in Brazil you might want to use regional servers.
4. Finally, restart the service and let's see if there's any luck.

[correct command]

sudo systemctl restart systemd-timesyncd

You might want to restart the computer altogether, just in case.

1 Like