From nobody Sat Feb 25 16:16:25 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PPBhs0w68z3tb2L; Sat, 25 Feb 2023 16:16:29 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PPBhq6vHYz3MTC; Sat, 25 Feb 2023 16:16:27 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net; dmarc=none Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.17.1/8.15.2) with ESMTPS id 31PGGQPc011042 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 25 Feb 2023 08:16:26 -0800 (PST) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.17.1/8.15.2/Submit) id 31PGGQ4c011041; Sat, 25 Feb 2023 08:16:26 -0800 (PST) (envelope-from fbsd) Date: Sat, 25 Feb 2023 08:16:25 -0800 From: bob prohaska To: freebsd-arm@freebsd.org, freebsd-current@freebsd.org Subject: Re: Timekeeping problem in /usr/src on new RPI aarch64 snapshot Message-ID: <20230225161625.GB8127@www.zefox.net> References: <20230224210502.GA8127@www.zefox.net> <1216867532.11893.1677280869319@localhost> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1216867532.11893.1677280869319@localhost> X-Spamd-Result: default: False [-1.10 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MID_RHS_WWW(0.50)[]; WWW_DOT_DOMAIN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; R_SPF_NA(0.00)[no SPF record]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org,freebsd-current@freebsd.org]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; TO_DN_NONE(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[zefox.net]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4PPBhq6vHYz3MTC X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On Sat, Feb 25, 2023 at 12:21:09AM +0100, Ronald Klop wrote: > > UFS stores the current timestamp in the superblock of the FS on clean > shutdown/unmount. On boot it reads the time from the timestamp in the > superblock of the root FS. Of coarse this timestamp is behind for the > duration that the machine was off or rebooting so you need to adjust that > using ntp. For ZFS root you can use the fakertc port to do something > similar. > > Mark Millard points out: /etc/localtime Current zoneinfo file, see tzsetup(8) and zic(8). /etc/wall_cmos_clock Empty file. Its presence indicates that the machine's CMOS clock is set to local time, while its absence indicates a UTC CMOS clock. Since there is no /etc/wall_cmos_clock on the newly-installed filesystem it appears the superblock timestamp is then interpreted as UTC when a Pi boots, using whatever happens to be set in /etc/localtime. My confusion is reduced somewhat. On first boot, what is the state of /etc/localtime? I've neglected to run tzsetup immediately on many previous installations and not noticed any complaints about mis-set clocks in buildworld. Is this new behavior? Thanks to both Mark and Ronald! bob prohaska