Commit 7ac33e16 authored by Jérome Perrin's avatar Jérome Perrin

DateTimePatch: keep DateTime.__eq__ behavior from DateTime 2

We have too much code depending on this behavior, so we keep this patch
for now.
parent 70345deb
...@@ -35,6 +35,15 @@ SyntaxError, DateError, TimeError, localtime, time ...@@ -35,6 +35,15 @@ SyntaxError, DateError, TimeError, localtime, time
STATE_KEY = 'str' STATE_KEY = 'str'
# DateTime 3 changed the __eq__ behavior and d1 == d2 only if they have the same same
# timezone. With DateTime 2 two dates from different timezones representing the same
# time were equal. This patch keeps the behavior from DateTime 2.
# See zopefoundation/DateTime commit fff6d04 (Various cleanups, improve unpickling
# speed and distinguish between equal representations and references to equal points
# in time., 2011-05-06)
DateTimeKlass.__eq__ = DateTimeKlass.equalTo
# ERP5 Patch for different pickle implementation, to optimize for disk usage. # ERP5 Patch for different pickle implementation, to optimize for disk usage.
# We had different __getstate__ implementations, so we need __setstate__ to support # We had different __getstate__ implementations, so we need __setstate__ to support
# loading these formats that might be present in ZODBs. # loading these formats that might be present in ZODBs.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment