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

Lennart Regebro regebro at gmail.com
Fri Oct 5 17:37:52 EDT 2007


On 10/5/07, Laurence Rowe <l at lrowe.co.uk> wrote:
> 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

That seems like a reasonable solution. (Although maybe _upgrade_old
isn't the best method name then, but that's details ;) ),

-- 
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64


More information about the Zope-Dev mailing list