"Dennis Lee Bieber" <
wlf...@ix.netcom.com> wrote in message
news:mn8gfg9ivl3ca3d12...@4ax.com...
> If one needs accurate time on an R-Pi, either a network connection to
> NTP servers, a battery-backed RTC module (though those do tend to lose a
> bit of time and need to be resynced to another time source at periods), or
> a GPS time source.
My Pi's are connected to my LAN, so they get the benefit of NTP resyncs
every so often. The problem comes when a Pi reboots and then can't see the
LAN for a while - eg because everything has come back after a power cut and
the router is taking ages to connect to the internet. In that case, the Pi
can be running for a significant period of time with a slightly-wrong time.
I notice this on the Pi which logs data from my weather station: I've seen
occasions when the graphs of temperature, wind speed etc have a section
which goes back in time and then suddenly jumps forwards in time again once
NTP can reset the clock to the correct time. Usually the temporary error is
only 30 minutes or so - enough to create an "interesting" blip (*) but not
enough to go back to before the beginning of the graph (I plot the last 48
hours' data).
What is the accuracy of the clock on the Pi if it initially syncs with an
NTP source but then loses network contact while remaining booted up? What is
the default resync period for Raspberry PiOS - is it every 24 hours or is it
more/less frequent that that? My old (Windows 7) laptop had a very poor RTC
which lost a lot of time - several minutes over the default resync time of
Windows - so I found the registry keys to make it resync more frequently -
probably once per day. My new Windows 10 laptop never seems to be out by
more than a few seconds, so either its RTC is more accurate or it resyncs
more often.
(*) We're used to see discontinuities on the y axis of a value-versus-time
graph, but a discontinuity on the x axis caused by the time setting itself
to a silly value and then righting itself, is not something that we're used
to seeing.