TZ environment variable

Paul Eggert eggert at CS.UCLA.EDU
Thu May 19 21:44:21 UTC 2005


Robbin Kawabata <Robbin.Kawabata at eng.sun.com> writes:

> A message-id could be created, perhaps by concatenating the timezone
> name with the tzname (for example, "America/Los_Angeles_PST").

I like most of your proposal, and the basic idea makes sense, but
unfortunately this particular method won't work in general.  For
example, for Europe/Portugal, the abbreviation "LMT" sometimes means
"Local Mean Time" and sometimes "Lisbon Mean Time", so
"Europe/Portugal_LMT" would be ambiguous.

Perhaps the tz database needs to have an augmented form, that
specifies an unambiguous name for each local zone abbreviation.  That
might be something that gets folded in while we're adding support for
64-bit time_t values, perhaps?


> We might use a new specifier in strftime() (which would call
> dcgettext()) to return the localized tzname or the original tzname
> if no localized tzname exists.

This should be the %EZ specifier, since E designates the locale's
alternative representation.



More information about the tz mailing list