On Sun, Feb 04, 2018 at 06:45:16PM +0100, Nicolas George wrote:
David Wright (2018-02-04):
$ TZ=London date
Sun Feb 4 17:17:56 London 2018
$ TZ=UtterNonsense date
Sun Feb 4 17:44:00 UtterNonsense 2018
The fact that it printed the name you put and not the official name of
the time zone shows that the value is invalid. The correct value would
have been:
$ TZ=Europe/London date
Sun Feb 4 17:44:49 GMT 2018
Yup. This is worse when london is on DST:
env TZ=London date --iso=seconds -d '2018-06-04T19:15+0000'
2018-06-04T19:15:00+00:00
env TZ=Europe/London date --iso=seconds -d '2018-06-04T19:15+0000'
2018-06-04T20:15:00+01:00
I would love if that were fixable, but it's actually required by POSIX.
(Any arbitrary string can be a timezone name, with a bunch of parameters
specifying the offset from UTC, DST rules, etc. In the absence of
other parameters it's a synonym for UTC.) That's a glibc thing, not a
date(1) thing.
Mike Stone