On Fri, Apr 22, 2022 at 12:28:21AM +0200, Sebastian Benoit wrote:
> 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.

But we want the time standard and not the GMT timezone here. At least I
prefer UTC over GMT (because I had cases where GMT was used where BST
should have been used). UTC is always clear because it is the time standard. 

-- 
:wq Claudio

Reply via email to