bartek
2008-01-02 14:09:24 UTC
Hi
I have a problem with this change - when it is applied, activities are
not executed. On the HEAD version with this one reverted everything
works fine. From what I found out, it is because the value of "now"
supplied by activity tool to sql methods is being converted to UTC,
which means 1 hour is subtracted (my machine is set to GMT+1), in effect
the activity tool executes only messages which are older then one hour :)
Has this patch been tested on a machine using timezone other then GMT?
Bartek
I have a problem with this change - when it is applied, activities are
not executed. On the HEAD version with this one reverted everything
works fine. From what I found out, it is because the value of "now"
supplied by activity tool to sql methods is being converted to UTC,
which means 1 hour is subtracted (my machine is set to GMT+1), in effect
the activity tool executes only messages which are older then one hour :)
Has this patch been tested on a machine using timezone other then GMT?
Bartek
Author: ivan
Date: Wed Nov 28 15:17:14 2007
New Revision: 17867
URL: http://svn.erp5.org?rev=17867&view=rev
Convert explicitly DateTime values to UTC.
erp5/trunk/products/ERP5Type/patches/sqlvar.py
Modified: erp5/trunk/products/ERP5Type/patches/sqlvar.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/sqlvar.py?rev=17867&r1=17866&r2=17867&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/sqlvar.py (original)
+++ erp5/trunk/products/ERP5Type/patches/sqlvar.py Wed Nov 28 15:17:14 2007
@@ -19,6 +19,7 @@
from string import atoi,atof
from types import StringType
from Products.ERP5Type.PsycoWrapper import psyco
+from DateTime import DateTime
name=self.__name__
@@ -70,17 +71,15 @@
- v=v.ISO()
- v=v.strftime('%Y-%m-%d %H:%M:%S')
- v=str(v)
+ v=v.toZone('UTC').ISO()
+ v = DateTime(v)
+ v=v.toZone('UTC').ISO()
return 'null'
raise ValueError, (
'Invalid datetime value for <em>%s</em>: %r' % (name, v))
-
v=md.getitem('sql_quote__',0)(v)
# End of patch
_______________________________________________
Erp5-report mailing list
Erp5-report at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-report
Date: Wed Nov 28 15:17:14 2007
New Revision: 17867
URL: http://svn.erp5.org?rev=17867&view=rev
Convert explicitly DateTime values to UTC.
erp5/trunk/products/ERP5Type/patches/sqlvar.py
Modified: erp5/trunk/products/ERP5Type/patches/sqlvar.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/sqlvar.py?rev=17867&r1=17866&r2=17867&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/sqlvar.py (original)
+++ erp5/trunk/products/ERP5Type/patches/sqlvar.py Wed Nov 28 15:17:14 2007
@@ -19,6 +19,7 @@
from string import atoi,atof
from types import StringType
from Products.ERP5Type.PsycoWrapper import psyco
+from DateTime import DateTime
name=self.__name__
@@ -70,17 +71,15 @@
- v=v.ISO()
- v=v.strftime('%Y-%m-%d %H:%M:%S')
- v=str(v)
+ v=v.toZone('UTC').ISO()
+ v = DateTime(v)
+ v=v.toZone('UTC').ISO()
return 'null'
raise ValueError, (
'Invalid datetime value for <em>%s</em>: %r' % (name, v))
-
v=md.getitem('sql_quote__',0)(v)
# End of patch
_______________________________________________
Erp5-report mailing list
Erp5-report at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-report
--
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"
"feelings affect productivity. (...) unhappy people write worse
software, and less of it."
Karl Fogel, "Producing Open Source Software"