Date: Sun, 5 Dec 2021 01:03:27 +0300 From: Greg 'groggy' Lehey <grog@FreeBSD.org> To: Derek Schrock <dereks@lifeofadishwasher.com> Cc: =?iso-8859-1?Q?=D6zkan?= KIRIK <ozkan.kirik@gmail.com>, freebsd-hackers@freebsd.org Subject: Re: zoneinfo problem Message-ID: <20211204220327.GA50507@eureka.lemis.com> In-Reply-To: <YastsP5Lj1URokWT@ircbsd.lifeofadishwasher.com> References: <CAAcX-AFQdth2BVCf%2BxmK%2BU30G-3DZzJ6_FsyAqRAYvnbDhoXGw@mail.gmail.com> <YastsP5Lj1URokWT@ircbsd.lifeofadishwasher.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20211204220327.GA50507>