My clock is off (slow) a by a couple of minutes.
I seem to recall that there was a command line program that would get the internet time and update the bios clock and the OS clock but I just cant recall the name.
I really need to get my clock back in sync
TIA
@erbenton the timedatectl
will show the status. I set my BIOS time to UTC, which is the default these days.
How did you set your bios time accurately? mine is incorrect
@erbenton You should (as root user) be able to run timedatectl --adjust-system-clock
I just now found this and it seems to work but i can not get my two systems to be closer than 3 seconds:
date -d "$(wget --method=HEAD -qSO- --max-redirect=0 google.com 2>&1 | sed -n 's/^ *Date: *//p')"
hwclock -s
Isn’t there a service in TW that retrieves internet time and sets all the clocks including the RTC clock so everything is accurate time wise?
System time is critical, it has to be correct to less than a second and it would be better if PC1 through PCn had the same time to within 1 ms
@erbenton I run a local gps (pps) time server to sync all my systems to with chrony…
That writes the RTC from the OS clock. Both my RTC and OS clock are the same but they are equally wrong compared to a time standard on the internet so unless i can get the real UTC time i am in a useless circular loop. I really hope this makes sense.
@erbenton what does timedatectl
show, are you running chrony?
timedatectl --adjust-system-clock
Local time: Wed 2024-06-12 20:50:03 CDT
Universal time: Thu 2024-06-13 01:50:03 UTC
RTC time: Thu 2024-06-13 01:50:03
Time zone: America/Chicago (CDT, -0500)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* my.server.com 1 6 377 20 +7826ns[+9427ns] +/- 225us
[malcolmlewis]: Where does it get its time from?
I have 5 pc’s and i would like to do something like what you are doing. Maybe you could explain how you set it up?
@erbenton I use a RPi3 with a RTC and GPS. I wrote this awhile back https://en.opensuse.org/HCL:Raspberry_Pi3_GPS and used this for the RTC https://en.opensuse.org/HCL:Raspberry_Pi3_RTC
When i run that on two pc’s i get different results by several seconds and the time i hit enter on each command is only a fraction of a second different
So here is what you asked for compare UTC times fro each system:
PC1:
# timedatectl; hwclock
Local time: Wed 2024-06-12 18:44:44 PDT
Universal time: Thu 2024-06-13 01:44:44 UTC
RTC time: Thu 2024-06-13 01:44:44
Time zone: America/Los_Angeles (PDT, -0700)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
2024-06-12 18:44:44.734611-07:00
PC2:
# timedatectl; hwclock
Local time: Wed 2024-06-12 18:47:08 PDT
Universal time: Thu 2024-06-13 01:47:08 UTC
RTC time: Thu 2024-06-13 01:47:08
Time zone: America/Los_Angeles (PDT, -0700)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
2024-06-12 18:47:08.692102-07:00
@erbenton you don’t have chronyd ? systemctl status chronyd
if not running, then systemctl enable --now chronyd
Interesting, so you use your Pi to provide accurate time to every pc on your local net. It’s a good idea as long as the Pi can get the true time accurately and a GPS unit should do that.
But Linux should be getting time from a time server like (here are 3 candidates)
pool.ntp.org
1.opensuse.pool.ntp.org
2.opensuse.pool.ntp.org
and setting the time accordingly and it apparently is not.
Malcom: I think you found it, chronyd was not enabled on my laptop
How do force that to do an immediate update?
@erbenton yes, it’s a stratum 1 setup What does
chronyc tracking
show?
Look at YaST NTP and switch to time-a-g.nist.gov
and time-b-g.nist.gov
@erbenton it should sync pretty quickly…
chronyc tracking
Reference ID : 00000000 ()
Stratum : 0
Ref time (UTC) : Thu Jan 01 00:00:00 1970
System time : 0.000000000 seconds slow of NTP time
Last offset : +0.000000000 seconds
RMS offset : 0.000000000 seconds
Frequency : 12.006 ppm slow
Residual freq : +0.000 ppm
Skew : 0.000 ppm
Root delay : 1.000000000 seconds
Root dispersion : 1.000000000 seconds
Update interval : 0.0 seconds
Leap status : Not synchronised
but status shows “Inactive Dead”
systemctl status chronyd
○ chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; preset: disabled)
Active: inactive (dead) since Wed 2024-06-12 19:18:23 PDT; 7s ago
Docs: man:chronyd(8)
man:chrony.conf(5)
Process: 2755 ExecStart=/usr/sbin/chronyd $OPTIONS (code=killed, signal=TERM)
CPU: 3msJun 12 19:18:23 systemd[1]: Starting NTP client/server…
Jun 12 19:18:23 systemd[1]: chronyd.service: Deactivated successfully.
Jun 12 19:18:23 systemd[1]: Stopped NTP client/server.
@erbenton Configure in YaST NTP, maybe no config…
in yast do select “sychronize without daemon” or some other choice.
I erased y time servers and added the 2 you posted
@erbenton can you show me a screenshot?