Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 2023 13:05:02 -0800
From:      bob prohaska <fbsd@www.zefox.net>
To:        freebsd-current@freebsd.org
Cc:        freebsd-arm@freebsd.org
Subject:   Timekeeping problem in /usr/src on new RPI aarch64 snapshot
Message-ID:  <20230224210502.GA8127@www.zefox.net>

next in thread | raw e-mail | index | archive | help
After installing 
FreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20230223-fe5c211ba873-261074.img
on a Pi3 and setting up the hard disk to use separate swap and /usr partitions
an oddity came to light regarding dates.

The image file was written to disk the night of the 23rd, from a Pi3 with
a correctly-set time and date. It was left idle overnight, configured the
morning of the 24th and booted without issue. It then cloned -current into
/usr/src, at which point the time was noticed to be wrong, apparently fast.

It turned out ntpdate wasn't running, so it was started and then tzsetup
run. After a reboot the time reported correctly. 

However, make buildworld in /usr/src triggers an exhortation to "check
your time" and refuses run further. 

running date on the system reports
Fri Feb 24 12:49:41 PST 2023
but ls -l /usr/src reports time around 
Feb 24 19:10
an obvious inconsistency.
 
Presumably just waiting until the system clock catches
up with the /usr/src timestamps will fix the error. Is
there a better method?

Still, the date and time handling don't seem quite right. 
In at least one earlier instance it appeared that tzsetup 
altered the reported timeszone without shifting the time
stamp by the UTC/PDT offset. I always thought timestamps
were internally in UTC+timezone, displayed with the right
offset. It looks to a casual observer like something else
is going on. 

An earlier fiasco (on this same Pi3) included wildly wrong
timestamps in a filesystem. The Pi3 has no hardware clock,
how does it set time when booted without a reference?

Thanks for reading,

bob prohaska




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230224210502.GA8127>