[Checkins] SVN: zc.async/branches/jackie-python-64bit/src/zc/async/utils.py - coerce return value of zc.async.utils.dt_to_long to always be a long
John Murphy
jackie at zope.com
Tue Nov 10 11:21:33 EST 2009
Log message for revision 105566:
- coerce return value of zc.async.utils.dt_to_long to always be a long
(so tests pass in 64 bit python)
Changed:
U zc.async/branches/jackie-python-64bit/src/zc/async/utils.py
-=-
Modified: zc.async/branches/jackie-python-64bit/src/zc/async/utils.py
===================================================================
--- zc.async/branches/jackie-python-64bit/src/zc/async/utils.py 2009-11-10 14:55:43 UTC (rev 105565)
+++ zc.async/branches/jackie-python-64bit/src/zc/async/utils.py 2009-11-10 16:21:33 UTC (rev 105566)
@@ -102,7 +102,8 @@
if dt.tzinfo is not None:
dt = dt.astimezone(pytz.UTC).replace(tzinfo=None)
delta = datetime.datetime.max - dt
- return (delta.days << 41 | delta.seconds << 24 | delta.microseconds << 4)
+ return long((delta.days << 41 | delta.seconds << 24 |
+ delta.microseconds << 4))
def long_to_dt(l):
microseconds = (l >> 4) & (2**20-1)
More information about the checkins
mailing list