[Zope3-dev] tzinfo

Guido van Rossum guido@python.org
Sun, 17 Mar 2002 22:26:23 -0500


I'll respond about the naming issues later.  One semantic issue:

> tzname() returns a string that names the intended timezone. What
> about the fact that a dtx may have multiple names for its notion of
> an individual timezone? Should this return a tuple, instead of a
> string? Should it be tznames instead of tzname?

What do you mean by multiple names?  Do you simply mean different ways
to spell the same name, e.g. "EST, "Eastern Standard Time"?  Or do you
mean that it's customary to use a different name when DST is in effect
than when it's not?  For the former, I prefer to return a single name
-- if you want a different name, supply a different tzinfo object.
For the latter, my intention was that it should return the name in
effect at the given date/time.  E.g. a tzinfo object representing the
US/Eastern timezone with DST rules could return "EST" for dates on
which DST is off, and "EDT" for dates on which DST is off.  (Or it
could return US/Eastern year round -- that's an implementation choice
for the tzinfo object.)

--Guido van Rossum (home page: http://www.python.org/~guido/)