[SQL-CVS] r1787 - home/phd/SQLObject/paramstyles/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <sub...@co...> - 2006-05-19 15:40:56
|
Author: phd
Date: 2006-05-19 09:40:50 -0600 (Fri, 19 May 2006)
New Revision: 1787
Modified:
home/phd/SQLObject/paramstyles/sqlobject/col.py
Log:
Merged patches from the revisions 1784:1786 from the trunk
Modified: home/phd/SQLObject/paramstyles/sqlobject/col.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/col.py 2006-05-19 15:39:35 UTC (rev 1786)
+++ home/phd/SQLObject/paramstyles/sqlobject/col.py 2006-05-19 15:40:50 UTC (rev 1787)
@@ -47,7 +47,7 @@
from mx import DateTime
except ImportError:
try:
- import DateTime # old version of mxDateTime
+ import DateTime # old version of mxDateTime, or Zope's Version if we're running with Zope
except ImportError:
mxdatetime_available = False
else:
@@ -60,7 +60,10 @@
if mxdatetime_available:
DateTimeType = type(DateTime.now())
- TimeType = type(DateTime.Time())
+ if hasattr(DateTime, "Time"):
+ TimeType = type(DateTime.Time())
+ else: # Zope
+ TimeType = type(DateTime.DateTime.Time(DateTime.DateTime()))
if datetime_available:
default_datetime_implementation = DATETIME_IMPLEMENTATION
|