From nobody Tue Sep 14 15:33:58 2021 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 E45A617C9090 for ; Tue, 14 Sep 2021 15:34:10 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4H86p94Ks3z4SQ3 for ; Tue, 14 Sep 2021 15:34:08 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from kalamity.joker.local (123-48-130-181.area1b.commufa.jp [123.48.130.181]) (authenticated bits=0) by www121.sakura.ne.jp (8.16.1/8.16.1/[SAKURA-WEB]/20201212) with ESMTPA id 18EFXwRc026867 for ; Wed, 15 Sep 2021 00:33:58 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Wed, 15 Sep 2021 00:33:58 +0900 From: Tomoaki AOKI To: freebsd-current@freebsd.org Subject: Re: git commit for WITH_DETECT_TZ_CHANGES breaks date, et al Message-Id: <20210915003358.e07554a69c01f6125850b26c@dec.sakura.ne.jp> In-Reply-To: <20210914103736.4dbe1252@bsd64.grem.de> References: <174267aa-00de-6e35-a75a-80be3617b6a1@protected-networks.net> <20210914110246.724cf733@ernst.home> <20210914103736.4dbe1252@bsd64.grem.de> Reply-To: junchoon@dec.sakura.ne.jp Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) 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-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4H86p94Ks3z4SQ3 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of junchoon@dec.sakura.ne.jp has no SPF policy when checking 153.125.133.21) smtp.mailfrom=junchoon@dec.sakura.ne.jp X-Spamd-Result: default: False [-1.60 / 15.00]; HAS_REPLYTO(0.00)[junchoon@dec.sakura.ne.jp]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[123.48.130.181:received]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[sakura.ne.jp]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Tue, 14 Sep 2021 10:37:36 +0200 Michael Gmelin wrote: > > On Tue, 14 Sep 2021 09:02:46 +0000 > Gary Jennejohn wrote: > > > On Mon, 13 Sep 2021 21:30:02 -0400 > > Michael Butler via freebsd-current > > wrote: > > > > > After commit ddedf2a11eb20af1ee52cb3da70a57c21904af8f date fails to > > > recognize any configured timezone when WITH_DETECT_TZ_CHANGES is > > > not set. > > > > > > For example .. > > > > > > imb@vm01:/home/imb> date > > > Tue Sep 14 01:25:57 2021 > > > > > > Every other daemon also thinks it's running in UTC+0 :-( > > > > > > When libc is recompiled with WITH_DETECT_TZ_CHANGES=yes in > > > /etc/src.conf, the output is (for me) .. > > > imb@vm01:/usr/src/lib/libc> date > > > Mon Sep 13 21:28:29 EDT 2021 > > > > > > > Same here. After instaling the new world this morning I was suddenly > > in UTC instead of CEST (2 hours difference). > > > > Thanks for the fix :-) > > Before reading your message, I (ironically) wanted to tell you about > your email's date header containing the wrong timezone ^_^ > > -m > > -- > Michael Gmelin > Just a thought (not at all tested), but... #define change_in_tz(X) 0 in line 393 of localtime.c should be #define change_in_tz(X) 1 if I understand correctly. Or remove line 392 and 393 with guarding added line 470 though 485 with #ifdef DETECT_TZ_CHANGES. Old behaviour never returns there. I suspect current code without defining WITH_DETECT_TZ_CHANGES=yes in /etc/src.conf make first tzload() call do nothing and forth fallback to UTC. -- Tomoaki AOKI