$ timedatectl set-ntp off
$ timedatectl set-ntp on
All of requests gets timeout error:
$ systemctl status systemd-timesyncd.service
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; preset: enabled)
Active: active (running) since Fri 2023-02-03 16:49:21 +0330; 7min ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 27024 (systemd-timesyn)
Status: "Connecting to time server 178.63.52.31:123 (0.manjaro.pool.ntp.org)."
Tasks: 2 (limit: 9406)
Memory: 2.7M
CPU: 117ms
CGroup: /system.slice/systemd-timesyncd.service
└─27024 /usr/lib/systemd/systemd-timesyncd
Feb 03 16:54:01 milad-pc systemd-timesyncd[27024]: Timed out waiting for reply from 178.63.52.50:123 (1.manjaro.pool.ntp.org).
Feb 03 16:54:12 milad-pc systemd-timesyncd[27024]: Timed out waiting for reply from 217.144.138.234:123 (2.manjaro.pool.ntp.org).
Feb 03 16:54:22 milad-pc systemd-timesyncd[27024]: Timed out waiting for reply from 129.70.132.35:123 (2.manjaro.pool.ntp.org).
Feb 03 16:54:32 milad-pc systemd-timesyncd[27024]: Timed out waiting for reply from 141.64.5.250:123 (2.manjaro.pool.ntp.org).
Feb 03 16:54:43 milad-pc systemd-timesyncd[27024]: Timed out waiting for reply from 62.108.36.235:123 (2.manjaro.pool.ntp.org).
Feb 03 16:54:53 milad-pc systemd-timesyncd[27024]: Timed out waiting for reply from 88.99.76.254:123 (3.manjaro.pool.ntp.org).
Feb 03 16:55:03 milad-pc systemd-timesyncd[27024]: Timed out waiting for reply from 188.40.142.18:123 (3.manjaro.pool.ntp.org).
Feb 03 16:55:13 milad-pc systemd-timesyncd[27024]: Timed out waiting for reply from 85.214.46.39:123 (3.manjaro.pool.ntp.org).
Feb 03 16:55:24 milad-pc systemd-timesyncd[27024]: Timed out waiting for reply from 178.215.228.24:123 (3.manjaro.pool.ntp.org).
Feb 03 16:56:38 milad-pc systemd-timesyncd[27024]: Timed out waiting for reply from 157.90.3.240:123 (0.manjaro.pool.ntp.org)
What’s the problem and how can I fix it?
More Information:
I can ping all servers without any problem, e.g.
$ ping 0.manjaro.pool.ntp.org
PING 0.manjaro.pool.ntp.org (213.81.129.99) 56(84) bytes of data.
64 bytes from ip99.mikrocom.sk (213.81.129.99): icmp_seq=1 ttl=42 time=127 ms
64 bytes from ip99.mikrocom.sk (213.81.129.99): icmp_seq=2 ttl=42 time=129 ms
I tried your command but I couldn’t understand its results, here is the result:
$ nc -z -vvv -u 0.manjaro.pool.ntp.org 123 ─╯
Notice: Real hostname for 0.manjaro.pool.ntp.org [78.46.53.2] is alpha.rueckgr.at
Notice: Real hostname for 0.manjaro.pool.ntp.org [49.12.132.53] is 25000-035.cloud.services.bauer-group.com
Notice: Real hostname for 0.manjaro.pool.ntp.org [164.68.124.74] is kyou.thehomeofanime.de
Notice: Real hostname for 0.manjaro.pool.ntp.org [136.243.202.118] is time01.nevondo.com
Total received bytes: 0
Total sent bytes: 0
Thank you for informing about Timeouts.
I figured it out, it seems government is blocked ntp service port because after using a VPN, I was able to sync time and date quickly and without any problem.
But I still have another question: How can I prevent the changing date and time after reboot? because each time I reboot, the time is wrong again.
If it starts at like 1970 then your RTC-Battery in your computer needs to be replaced. (Also known as CMOS Battery)
If it is just showing wrong timezone you can set that using timedatectl, see it’s man page…
If it is showing correct timezone but is shifted a few hours, you will need to change your setting of “RTC in local TZ” using the same command as above.
It is not because of CMOS Battery because this problem is occurring after daylight. Also it is always one hour before.
Also I checked the timezone and it is correct:
$ timedatectl l
Local time: Fri 2023-02-03 19:07:36 +0330
Universal time: Fri 2023-02-03 15:37:36 UTC
RTC time: Fri 2023-02-03 15:37:36
Time zone: Asia/Tehran (+0330, +0330)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Check what i added to my reply at same time you posted your reply
Local time: Fri 2023-02-03 18:41:16 +03
Universal time: Fri 2023-02-03 15:41:16 UTC
RTC time: Fri 2023-02-03 15:41:16
Time zone: Europe/Istanbul (+03, +0300)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Mine stays correct because i use UTC time in the BIOS, and not my local time…
Keep in mind that if you dual boot using Micro$@$, it will bug your RTC time, because one uses UTC as system time and the other uses Local time by default…