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

        issue9698
        review329211002
diffstat:

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

diffs (12 lines):

diff -r 4631138be399 -r b99e3e417696 tryton/pyson.py
--- a/tryton/pyson.py   Wed Oct 21 23:27:41 2020 +0200
+++ b/tryton/pyson.py   Thu Oct 22 12:11:09 2020 +0200
@@ -644,7 +644,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