Hey,
i just build a new pc of used parts just for fun.
Installed artix openrc base with kde totaly barebone.
I woundered, why this is my Time:
[user@mediapc ~]$ date
Sa 27. Aug 05:42:08 CEST 2022
[user@mediapc ~]$
its totaly wrong.
Timezone is:
[user@mediapc ~]$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 33 27. Aug 05:21 /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin
[user@mediapc ~]$
So i wanted to fix that and followed https://wiki.archlinux.org/title/System_time#Time_synchronization
I choosed https://wiki.archlinux.org/title/OpenNTPD because that package is in the artix repos.
But this dont work:
[mediapc user]# ntpd -d
/var/db/ntpd.drift is empty
ntp engine ready
peer 194.36.144.87 now valid
peer 185.232.69.65 now valid
peer 45.9.61.155 now valid
peer 79.133.44.139 now valid
adjusting local clock by -4061.675931s
adjusting local clock by -4061.645494s
adjusting local clock by -4061.517764s
adjusting local clock by -4061.487612s
[user@mediapc ~]$ date
Sa 27. Aug 05:44:42 CEST 2022
[user@mediapc ~]$
it should be:
[user@polis ~]$ sudo ntpd -d
/var/db/ntpd.drift is empty
ntp engine ready
peer 178.63.9.212 now valid
peer 79.133.44.140 now valid
peer 185.104.163.42 now valid
peer 5.145.135.89 now valid
adjusting local clock by 5.236196s
adjusting local clock by 5.207103s
adjusting local clock by 5.210619s
[user@polis ~]$ date
Sa 27. Aug 04:40:35 CEST 2022
[user@polis ~]$
Edit:
/etc/ntpd.conf on both machines:
# $OpenBSD: ntpd.conf,v 1.16 2019/11/06 19:04:12 deraadt Exp $
#
# See ntpd.conf(5) and /etc/examples/ntpd.conf
#
#servers 2.arch.pool.ntp.org
#server time.cloudflare.com
#sensor *
#constraint from "9.9.9.9" # quad9 v4 without DNS
#constraint from "2620:fe::fe" # quad9 v6 without DNS
#constraints from "www.google.com" # intentionally not 8.8.8.8
#server 0.fr.pool.ntp.org iburst
#server 1.fr.pool.ntp.org iburst
#server 2.fr.pool.ntp.org iburst
#server 3.fr.pool.ntp.org iburst
server 0.de.pool.ntp.org
server 1.de.pool.ntp.org
server 2.de.pool.ntp.org
server 3.de.pool.ntp.org
"Fun Fact" if i change time manualy (like 12:49, what is totaly wrong), and then run ntpd -d, it shows me thousands of secounds wich he adjusted, but date shows still the wrong time. On both Machines.
Edit2:
Example:
[user@polis ~]$ date
Sa 27. Aug 21:47:54 CEST 2022
[user@polis ~]$
[user@polis ~]$ sudo ntpd -d
doas (user@polis) password:
/var/db/ntpd.drift is empty
ntp engine ready
peer 131.188.3.222 now valid
peer 162.159.200.1 now valid
peer 185.197.135.21 now valid
peer 185.183.159.238 now valid
adjusting local clock by -61191.020144s
[user@polis ~]$ date
Sa 27. Aug 21:48:53 CEST 2022
[user@polis ~]$
Edit3:
Installed Artix on a VM for testing.
This time i followed https://wiki.archlinux.org/title/Network_Time_Protocol_daemon#Synchronize_time_once_per_boot
Its says it adjust, but didnt work/still wrong time is used/set.
Edit4:
Cloned my VM few times, and tried other Methods. No method mentioned on the wiki works.
Tried the same with a Arch install. There it works without any problem. Even if i set a HUGE (23 hours +) difference. After a reboot, or ntpd restart, time gets synced to correct value.
Dont know if openrc is the problem? cant imagine...