Re: PDT timezone but UTC time
Mark Millard <[email protected]> Sun, 28 Jun 2026 19:25:59 -0700
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <[email protected]> |
On 6/28/26 17:08, bob prohaska wrote: > On Sun, Jun 28, 2026 at 10:29:11AM -0700, Steve Rikli wrote: >> On Sun, Jun 28, 2026 at 08:51:30AM -0700, bob prohaska wrote: >>> Lately hosts reporting >>> # uname -apKU >>> FreeBSD ns2.zefox.net 14.4-RELEASE-p6 FreeBSD 14.4-RELEASE-p6 GENERIC arm64 aarch64 1404000 1404000 >>> >>> have been reporting >>> # date >>> Sun Jun 28 15:23:29 PDT 2026 >>> >>> where the reported timezone is correct but the reported time looks like UTC >>> >>> /etc/rc.conf contains >>> ntpd_enable="YES" >>> >>> but it looks like ntpd_flags is empty. Is setting >>> ntpd_flags="-g" >>> the needed fix? >> >> I typically set >> >> $ grep ntpd_ /etc/rc.conf >> ntpd_enable="YES" >> ntpd_sync_on_start="YES" >> >> ...which ends up being equivalent to setting "-g" in ntpd_flags. >> >> $ ps axww | grep ntpd >> 846 - Ss 1:30.31 /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g >> >> I simply figured since someone went to the effort to add an rc variable, >> I'd make use of it. :-) >> >> Plus this leaves ntpd_flags for other possibly more complex setups, >> whereas allowing large adjustments during startup seems like something >> more commonly used. >> >> However, I'm not sure how this is involved with your comments about UTC. >> Are you saying the actual system time is off? E.g. it wasn't really >> 3:23pm PDT when you typed the 'date' command above? >> > The numerical value of the time was correct if interpreted as UTC, > but fast by seven if interpreted at PDT. > >> Maybe compare 'date' and 'date -u' output. >> > Running ntpd -g as root seems to have cleared up the problem. > Could it simply be a bug in which the "date" command reports > the wrong timezone? > > This sort of behavior has been recurrent after system updates, > using freebsd-update. It's a binary only installation. You have not indicated how you configure things such that you expect PDT to be accurately displayed, at least once ntpd based time is in place. For example: do you have/use a /etc/wall_cmos_clock ? What does /etc/localtime indicate? Do you use tzsetup --and, if yes, how? Are you using adjkerntz explicitly under some conditions --and, if yes, how? What are the sysctl machdep.adjkerntz values shown under various conditions? Are crashes involved that might have prevented adjkerntz running at shutdown? > > Thanks for writing, > > bob prohaska > >> Cheers, >> sr. >> > > -- === Mark Millard marklmi at yahoo.com