[ntp:questions] Kind of OT : GMT timezones in linux

Per Hedeland per at hedeland.org
Wed Jun 27 20:06:50 UTC 2007


In article <g7eal4-t5m.ln1 at gateway.py.meinberg.de> Martin Burnicki
<martin.burnicki at meinberg.de> writes:
>
>Tony Rutkowski wrote:
>
>> At 09:14 AM 6/27/2007, Martin Burnicki wrote:
>>>So GMT-2 is correct for Athens.
>> 
>> I'm simply suggesting it should be UTC-2
>
>Neither of both is correct since the 3 letters before the number shall be an
>abbreviation of the time zone name when daylight saving is not in effect.

Indeed - i.e. all the frequently used/mentioned GMT+N and GMT-N are just
plain broken:

$ env TZ=GMT-2 date
Wed Jun 27 21:49:49 GMT 2007

This is obviously *not* GMT, yet the date string says that it is.

>Anyway, in most cases the Olson timezone library is used nowadays on
>Unix-like system, providing even more flexibility.

And besides the invaluable geographical-region-based zone files, it
comes with a directory full of GMT+/-N files - but using them gives a
different result:

$ env TZ=Etc/GMT-2 date
Wed Jun 27 21:49:52 GMT-2 2007

While possibly a dubious format for a date string, at least it isn't a
plain lie. And I don't think it would be possible to achieve this result
with the libc-builtin direct parsing of the TZ variable.

--Per Hedeland
per at hedeland.org





More information about the questions mailing list