Commit 87ba2dfe authored by Ivan Tyagov's avatar Ivan Tyagov

Convert explicitly DateTime values to UTC.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17869 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7e14ffd0
......@@ -231,10 +231,8 @@ class QueryMixin:
value = value.replace(' ','')
value = "'%s'" % value
else:
if hasattr(value, 'ISO'):
value = "'%s'" % value.ISO()
elif hasattr(value, 'strftime'):
value = "'%s'" % value.strftime('%Y-%m-%d %H:%M:%S')
if getattr(value, 'ISO', None) is not None:
value = "'%s'" % value.toZone('UTC').ISO()
else:
value = "'%s'" % sql_quote(str(value))
return value
......
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