[ntp:questions] Olson database of timezones in posix.1 format

David Woolley david at djwhome.demon.co.uk
Tue May 8 12:38:38 UTC 2007


In article <379300.74998.qm at web57207.mail.re3.yahoo.com>,
priya.chakravarthi at yahoo.com (Priya Chakravarthi) wrote:

> Hi Dave,

There are several Davids that contribute to this newsgroup and you gave
no clues, either through threading, or quoting, to establish which one.
(You should not use Re: without an in-reply-to header on mailing lists.)

> to get an answer for this. I am on the lookout for a complete list of
> POSIX strings for timezones found in the zoneinfo folder. When I see

This is continuously changing, even when the zoneinfo files don't change,
and some cannot be represented in the POSIX notation.

> strings such as GMT-11 in the zoneinfo folder I do not know how to

I think you will find that this is actually Etc/GMT-11.  It is not a valid
POSIX timezone name, so there can be no equivalent.  These are only really
there for the benefit of systems that don't recognize POSIX syntax and want
to represent an hour aligned timezone that does not have daylight saving time
and doesn't currently exist as a more specific one.

> handle it (how do you convert GMT-11 to std offset dst
> [offset],start[/time],end[/time] format?). Having a full list will help

You convert the timezone name into a syntactically valid one, preferably
the one for the country in question, then use:

XXX-11

where XXX is that name.  The GMT+-nn variants do not have daylight saving
time changes.

Zoneinfo contains historic and future timezone information and is not 
limited to two offset values each year, or to algorithmic rules for 
deciding when to change, which is why you can only substitute Posix format
code over limited time periods where those assumptions are valid.

If you want to enumerate all the possible timezone codes used by the
Olsen package, you should look at the source code for the rules.
Even if you don't have the source of the tables (which is free to download),
you can use zdump to enumerate all the changes for a particular file.




More information about the questions mailing list