Post by bob prohaskaPost by Mark Millard via freebsd-armPost by bob prohaskaIt seems that the timezone gets screwed up each time the OS is
upgraded on a Pi4 via sources on -current. ntpdate is working, but the
machine reports a local time of
Mon May 3 15:27:04 PDT 2021
while a Pi2 reports
Mon May 3 08:28:35 PDT 2021
The timezone is PDT in both cases, but the time shown looks like
UTC for the Pi4 but PDT for the Pi2.
Note: I assume that neither RPi* has a RTC, not that
it makes much of a difference here.
Correct, no RTC on any of them.
Post by Mark Millard via freebsd-arm# ls -Tld /etc/wall_cmos_clock
-r--r--r-- 1 root wheel 0 Aug 8 01:49:01 2017 /etc/wall_cmos_clock
and the other does not.
All RPi*s in my collection report having /etc/wall_cmos_clock,
including the one displaying the wrong time.
So much for my expectations.
Post by bob prohaskaSome are Pi2, running
armv7 12.2-stable, two are Pi3 running 14-current and 13.0-stable.
The only one showing wrong time is the Pi4 running 14-current.
Do all the RPi*'s agree for there output for:
# sysctl machdep.adjkerntz
machdep.adjkerntz: 0
?
(My example context; yours may vary. But to get uniform
handling, you would want all yours to agree.)
Do all the RPi*'s agree for their output of:
# strings /etc/localtime | tail -1
PST8PDT,M3.2.0,M11.1.0
(My example context; yours may vary. But to get uniform
handling, you would want all yours to agree.)
I'll note that:
# strings /etc/localtime | head -1
TZif2
indicates the format-version of the file from
what I can tell, allowing some cross checking
for things being as expected.
"man adjkerntz" has information on the subject.
Post by bob prohaskaWhen the Pi4 finishes building www/chromium I'll start experimenting
to identify just what I did to get the clock wrong. The obvious test
would be to correct the time with tzsetup and then update world and
kernel, reboot and see if time is again wrong. If there are other,
better things to try please indicate. I've never seen timekeeping
problems and know nothing of how it's done.
I'm not so sure that this large-change would well isolate
the problem --or be likely to change anything.
Post by bob prohaskaThis begs a question: If I simply re-run installworld, without updating,
will it overwrite the existing world again without rebuilding everything?
If you avoid buildworld and just installworld, sure.
(buildworld after installworld will rebuild various
things because of changes installworld makes, based
on what META_MODE tests for.)
But I'm not sure why you would do this. I'll note
that there are other targets for installing some
types of files, but they tend to destroy local tailoring
and so are normally only for starting over. Otherwise
etcupdate or the like deals with file adjustments
in a way less likely to replace your localizations.
Post by bob prohaskaThat would speed up the experiment considerably.
Post by Mark Millard via freebsd-armThere can be an issue of time going backwards, depending on
the delete vs. add action for /etc/wall_cmos_clock .
I've long wondered about messing with time settings while the
machine is doing something important, like running make. Is that
something to avoid?
Yep: avoid time changes in the middle of other things
that are based on comparing timestamps. make, in part,
uses timestamp comparisons. If date output ends up
before file system dates, waiting for the correct
time order can be appropriate.
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)