changeset 359701ac2a15 in tryton:5.4
details: https://hg.tryton.org/tryton?cmd=changeset;node=359701ac2a15
description:
        PYSON's DateTime defaults to the current time in UTC

        issue9698
        review329211002
        (grafted from b99e3e41769624d08590d754e9a619c1c6fb7d72)
diffstat:

 tryton/pyson.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r d37b2a0ee0ec -r 359701ac2a15 tryton/pyson.py
--- a/tryton/pyson.py   Wed Oct 28 23:59:06 2020 +0100
+++ b/tryton/pyson.py   Thu Oct 22 12:11:09 2020 +0200
@@ -630,7 +630,7 @@
                 and not isinstance(now, datetime.datetime)):
             now = datetime.datetime.combine(now, datetime.time())
         if not isinstance(now, datetime.datetime):
-            now = datetime.datetime.now()
+            now = datetime.datetime.utcnow()
         return now + relativedelta(
             year=dct['y'],
             month=dct['M'],

Reply via email to