From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11751 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] use UTC instead of GMT Date: Fri, 28 Jul 2017 09:00:17 -0400 Message-ID: <20170728130017.GX1627@brightrain.aerifal.cx> References: <20170722091903.19432-1-ncopa@alpinelinux.org> <20170722142625.GU1627@brightrain.aerifal.cx> <20170728143510.692c5020@ncopa-desktop.copa.dup.pw> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1501246836 5316 195.159.176.226 (28 Jul 2017 13:00:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Jul 2017 13:00:36 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-11764-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jul 28 15:00:31 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1db4sU-0000ps-2b for gllmg-musl@m.gmane.org; Fri, 28 Jul 2017 15:00:26 +0200 Original-Received: (qmail 13971 invoked by uid 550); 28 Jul 2017 13:00:29 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 13953 invoked from network); 28 Jul 2017 13:00:29 -0000 Content-Disposition: inline In-Reply-To: <20170728143510.692c5020@ncopa-desktop.copa.dup.pw> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:11751 Archived-At: On Fri, Jul 28, 2017 at 02:35:10PM +0200, Natanael Copa wrote: > On Sat, 22 Jul 2017 10:26:25 -0400 > Rich Felker wrote: > > > On Sat, Jul 22, 2017 at 11:19:03AM +0200, Natanael Copa wrote: > > > GMT is a timezone officially used by some countries in Europe and > > > Africa. UTC is not a timezone, but a time standard. No country or > > > territory officialy uses UTC as local time. > > > > > > Also, POSIX mentions UTC a few places[1][2] but never GMT (except as an > > > example[2] for a timezone) > > > > > > So it makes more sense to use UTC instead of GMT and return UTC when no > > > timezone is set in /etc/localtime or TZ is set to empty. > > > > > > [1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/gmtime.html > > > [2]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/timezone.html > > > --- > > > > > > This causes real problems for people: > > > https://github.com/gliderlabs/docker-alpine/issues/310#issuecomment-316732179 > > > > The motivation for the naming was that POSIX "UTC" is not actually UTC > > but something like UT1 or modified UTC more akin to historical GMT. > > Do you have any references on that? The definition of seconds since the epoch defines 86400-second calendar days: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16 > > You can certainly get it to show "UTC" just by setting TZ=UTC, but > > if users are actually hitting problems from this it should be reviewed > > whether the behavior still makes sense. > > The problem at hand seems to be that some docker image used hardcoded > timezone to EST so they added automatic tests to verify that timezone > is UTC. This seems like the real bug... > So tests broke on Alpine. To fix that it seems like they set the > timezone via TZ=UTC variable, and that broke things for users who set > the timezone via /etc/localtime. > > Basically lot of minor fuzz, which all can easily be worked around, but > its just annoying. > > I checked what FreeBSD, OpenBSD and GNU/Linux does when timezone is > unset. Seems that they all use "UTC" so I think that makes most sense. That may well end up being the reasonable position. Let's see what others have to say on the matter (hopefully without it getting too much into bikeshedding). Rich