[Zope3-dev] Can we remove ZopeLegacy for now?
Patrick K. O'Brien
pobrien@orbtech.com
Fri, 15 Mar 2002 09:50:57 -0600
Guido van Rossum wrote:
[snip]
> Another possibility is to adopt Phillip Eby's "tzinfo object" idea. I
> had an epiphany last night about how the tzinfo object can save
> date/time calculation semantics. The trick is to do all calculations
> using the naive time info only, but attach the same tzinfo object to
> the result that was used for the input. Then you could choose the
> desired semantics of your calculations by picking a tzinfo object, as
> follows:
>
> - No tzinfo object would imply the naive result
>
> - A tzinfo object representing a fixed timezone would imply the strict
> result (which ignores DST); this would also work for UTC
>
> - A tzinfo object representing the concept of "local time in some
> locality" would do the right thing for that locality (except that
> there's one one per year where the results might be ambiguous)
>
> I like this idea. I almost like it enough to make the tzinfo object
> part of the datetime base class, rather than relegating it to a
> subclass.
Ooooohhhhhh... I like it too! Is there any way I can help you like it enough
to make it part of the base class? <grin>
Since I finally got over the hump on learning how to use unittest, how about
if I volunteer to write a bunch of unit tests in exchange for a prototype
implementation? (And now I hold my breath hoping you don't ask me to write
*all* the unit tests *before* you'll do a prototype. <wink>)
---
Patrick K. O'Brien
Orbtech