[Zope3-dev] tzinfo

Patrick K. O'Brien pobrien@orbtech.com
Mon, 18 Mar 2002 00:15:53 -0600


[Guido van Rossum]
> > 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.)

I was thinking of all of the above. This is likely the least important
method of a tzinfo object, but I was just being thorough and going for
maximum flexibility. I don't have a strong objection if you feel that
returning a single string is sufficient.

---
Patrick K. O'Brien
Orbtech