changeset 17f3841e931b in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=17f3841e931b
description:
Cast CurrentTimestamp into timestamp to remove timezone
issue8342
diffstat:
trytond/ir/trigger.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r c9a5103e09bd -r 17f3841e931b trytond/ir/trigger.py
--- a/trytond/ir/trigger.py Sat Mar 28 17:13:12 2020 +0100
+++ b/trytond/ir/trigger.py Sat Mar 28 23:37:18 2020 +0100
@@ -229,7 +229,8 @@
if self.minimum_time_delay:
new_ids = []
# Use now from the transaction to compare with create_date
- cursor.execute(*Select([CurrentTimestamp()]))
+ timestamp_cast = self.__class__.create_date.sql_cast
+ cursor.execute(*Select([timestamp_cast(CurrentTimestamp())]))
now, = cursor.fetchone()
if isinstance(now, str):
now = cast_datetime(now)