[tz] Azerbaijan canceled daylight saving time

Paul Eggert eggert at cs.ucla.edu
Thu Mar 24 00:23:02 UTC 2016


On 03/23/2016 04:13 PM, Matt Johnson wrote:
> Etc/GMT-4 would be the most generic form.  (note the inverted sign is deliberate)

Yes, that works. I omitted 'Etc/GMT-4' mainly because its time zone 
abbreviation can be confusing. On my system:

$ TZ='Etc/GMT-4' date
Thu Mar 24 03:58:03 GMT-4 2016
$ TZ='AZT-4' date
Thu Mar 24 03:58:03 AZT 2016
$ TZ='Asia/Baku' date
Thu Mar 24 03:58:03 AZT 2016
$ date -u
Wed Mar 23 23:58:03 UTC 2016

The confusion comes because in typical English usage 'GMT-4' often means 
4 hours behind GMT. My impression is that the Etc/* zones are best 
avoided in applications that use time zone abbreviations.


> AZT-4 will work for POSIX compliant systems, but not necessarily with all systems.  I'm not 100% sure but I don't think it would work in Java, for example.

Yes, that's right.  In Java one could use "GMT+04:00"; this is a 
different syntax than POSIX TZ syntax, with the opposite sign among 
other things.So in practice a string like'Asia/Dubai' should be a 
more-portable workaround, as this should work on any platform where 
'Asia/Baku' works (albeit with the abbreviation 'GST', which is a bit of 
a stretch but still better than 'GMT-4').



More information about the tz mailing list