[Zope3-dev] Can we remove ZopeLegacy for now?

Shane Hathaway shane@zope.com
Fri, 15 Mar 2002 14:40:34 -0500


Guido van Rossum wrote:
> I know that most of this discussion is irrelevant now that I've
> expressed enthusiasm about tzinfo objects, but I want to gripe a
> little bit.
> 
> 
>>I've read the wiki pages and much of the discussion on python-dev,
>>and I'm actually not sure what the real issues are with timezone
>>support. I've seen the incredibly complex examples concerning adding
>>datetimes from different timezones across DST boundaries and
>>such.
>>
> 
> The example in this page:
> 
>   http://www.zope.org/Members/fdrake/DateTimeWiki/NaiveTime
> 
> is far from complex.  It only involves one time in one timezone, and
> asks the question what should happen if we add a whole number of days
> across a DST jump.  Re-read the page before you reply, please.

+1 on naive time. :-)

The calculation that should happen when adding 24 hours depends not only 
on the time zone offset but also the time zone *name*.  "EST" always 
means GMT-5, "EDT" always means GMT-4, and "US/Eastern" means either 
GMT-5 or GMT-4 depending on the date.  So 12:00 on April 6, 2002 EST, 
plus 24 hours, is 12:00 on April 7, 2002 EST (which doesn't actually 
occur), while 12 noon on April 6, 2002 US/Eastern, plus 24 hours, is 
13:00 on April 7, 2002 US/Eastern.  And like you said, if you add a day 
instead of 24 hours, the rules are different.

No matter what you do, you're not going to please everyone, since so 
many think that the calculation they want is what everyone else wants, 
and that's just not the case.  I know this from experience in trying to 
maintain time zone support in Zope's DateTime.  Let's simplify.

Shane