[ntp:questions] Kind of OT : GMT timezones in linux
martin.burnicki at meinberg.de
Wed Jun 27 16:01:20 UTC 2007
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.
However, we've just discussed about the sign of the number, as expected by
the standard C library, and why it is different from what one might think.
The old-style syntax for this used another 3 letters _after_ the number to
indicate that daylight saving is in effect, and they would be used as the
name for the time zone during daylight saving. E.g.
TZ=UTC0 specifies local time = UTC, without offset
TZ=CET-1 specified Central European Standard Time, i.e. UTC+1h
TZ=CET-1CST specifies Central European Summer Time, i.e. UTC+2h
AFAIK the abbreviations used for single time zones are not standardized,
though some like UTC, CET/CST, PST/PDT are commonly used.
> See ISO8601 or Markus Kuhn's useful summary
> at http://www.cl.cam.ac.uk/~mgk25/iso-time.html
I know that page, and I know the difference between GMT and UTC, but Markus'
page it does not even mention GMT, or abbreviations to be used for the time
On the contrary, Markus' page mentions that the sign of the UTC offset
should be written using e.g. -0500 for U.S./Canadian Eastern Standard Time
(EST), whereas the correct notation as expected by the standard C library
is EST5 rather than EST-5.
Hm, I've just read Darren's reply which mentions the POSIX syntax as also
described in Darren's link
While with the old syntax I mentioned above the TZ setting had to be changed
at the beginning and end of DST, POSIX has introduced an extended syntax
which lets the C library compute the beginning and end of DST automatically
without having to change the TZ setting.
Anyway, in most cases the Olson timezone library is used nowadays on
Unix-like system, providing even more flexibility.
More information about the questions