> Date: Fri, 22 Apr 2022 00:28:21 +0200
> From: Sebastian Benoit <be...@openbsd.org>
> 
> Claudio Jeker(cje...@diehard.n-r-g.com) on 2022.04.20 15:12:57 +0200:
> > On Wed, Apr 20, 2022 at 03:00:15PM +0200, Theo Buehler wrote:
> > > Found this when looking at the timezone issue a couple of weeks back and
> > > then forgot about it:
> > > 
> > > This setenv() + localtime() looks like a hack to me and I don't really
> > > understand why it should be preferable over using gmtime() directly. The
> > > only change in output that I can see is that it causes %Z to print GMT
> > > instead of UTC, so I modified the format string accordingly (but I have
> > > no strong opinion on this).
> > 
> > UTC is the proper timezone here. Not sure why gmtime results in %Z to
> > return GMT since gmtime converts into UTC. On the other hand timezones
> > in struct tm are strange so it probably just defaults to GMT for a 0
> > offset time.
> 
> well, no.
> UTC is not a timezone. UTC is a time standard.
> GMT is the correct timezone.

Hmm, well, GMT is many things, one of which is the name used in the UK
for the timezone UTC+0.  Other names for that timezone exist.  Instead
of UTC+0 many people simply write UTC, so in that sense UTC can be
considered a timezone.

In an international context it is definitely better to specify times
using the UTC "timezone".

Reply via email to