From nobody Sat Dec 4 22:03:27 2021 X-Original-To: freebsd-hackers@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 06A731899D53 for ; Sat, 4 Dec 2021 22:03:35 +0000 (UTC) (envelope-from grog@lemis.com) Received: from lax.lemis.com (www.lemis.com [45.32.70.18]) by mx1.freebsd.org (Postfix) with ESMTP id 4J63c669Xsz3rbQ for ; Sat, 4 Dec 2021 22:03:34 +0000 (UTC) (envelope-from grog@lemis.com) Received: from eureka.lemis.com (121-200-11-253.79c80b.mel.nbn.aussiebb.net [121.200.11.253]) by lax.lemis.com (Postfix) with ESMTP id 578EE28034; Sat, 4 Dec 2021 22:03:28 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id AEAAE2635BF; Sun, 5 Dec 2021 09:03:27 +1100 (AEDT) Date: Sun, 5 Dec 2021 01:03:27 +0300 From: Greg 'groggy' Lehey To: Derek Schrock Cc: =?iso-8859-1?Q?=D6zkan?= KIRIK , freebsd-hackers@freebsd.org Subject: Re: zoneinfo problem Message-ID: <20211204220327.GA50507@eureka.lemis.com> References: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline In-Reply-To: Organization: The FreeBSD Project Phone: +61-3-5309-0418 Mobile: +61-490-494-038. Use only as instructed. WWW-Home-Page: https://www.FreeBSD X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 User-Agent: Mutt/1.6.1 (2016-04-27) X-Rspamd-Queue-Id: 4J63c669Xsz3rbQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Saturday, 4 December 2021 at 3:58:24 -0500, Derek Schrock wrote: > On Sat, Dec 04, 2021 at 01:59:10AM EST, =D6zkan KIRIK wrote: >> # ln -s /usr/share/zoneinfo/Etc/GMT+3 /etc/localtime >> # date >> Sat Dec 4 03:48:50 -03 2021 >> >> Above, I want to set the timezone to GMT+3 but date command shows as GMT= -3 > > This is expected. > > https://github.com/eggert/tz/blob/2018g/etcetera#L38-L44 To quote that page, which is also in the sources as /usr/src/contrib/tzdata/etcetera: # Be consistent with POSIX TZ settings in the Zone names, # even though this is the opposite of what many people expect. # POSIX has positive signs west of Greenwich, but many people expect # positive signs east of Greenwich. For example, TZ=3D'Etc/GMT+4' uses # the abbreviation "-04" and corresponds to 4 hours behind UT # (i.e. west of Greenwich) even though many people would expect it to # mean 4 hours ahead of UT (i.e. east of Greenwich). I'd be more inclined to say "this is intentional" rather than "this is expected". I certainly didn't expect it. It's clearly a carry-over =66rom the old System V nonsense that made its way into POSIX. All the more reason to avoid the "GMT" offsets (GMT is no longer used in time zone calculations). Thanks for pointing this out. Greg -- Sent from my desktop computer. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft mail program reports problems, please read http://lemis.com/broken-MUA.php --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAmGr5a8ACgkQIubykFB6QiNdHwCeP8TGTQV2nz5wpp26pnpj8x86 9FAAmwfeedez8TrTbIj0zXivhj8dQSUK =6XYZ -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6--