[Zope-dev] Re: Changing DateTime to use pytz

Laurence Rowe l at lrowe.co.uk
Fri Oct 5 10:49:38 EDT 2007


Lennart Regebro wrote:

> On 10/5/07, Laurence Rowe <l at lrowe.co.uk> wrote:
>> If anyone thinks it is important I could an explicit upgrade path for
>> instances with a _millis attribute too (most current instances I would
>> assume).
> 
> I think the code must work with current instances without modifying them.
> 

All the tests still pass if I comment out the assignment:

     def _upgrade_old(self):
         """Upgrades a previously pickled DateTime object."""
         micros = long(math.floor(self._t * 1000000.0))
         #self._micros = micros # don't upgrade instances in place
         return micros

New patch at http://launchpadlibrarian.net/9811478/DateTime.patch

Laurence



More information about the Zope-Dev mailing list