changeset 518c3b3929cc in tryton:5.0
details: https://hg.tryton.org/tryton?cmd=changeset;node=518c3b3929cc
description:
        Show revision datetime in local timezone

        issue8365
        review271441002
        (grafted from ed4206bb000eb5ff0e5c59d6d1bdb0e3d5f84c66)
diffstat:

 tryton/gui/window/revision.py |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 19ab1b91b621 -r 518c3b3929cc tryton/gui/window/revision.py
--- a/tryton/gui/window/revision.py     Mon Jun 10 18:30:30 2019 +0200
+++ b/tryton/gui/window/revision.py     Mon May 27 23:18:37 2019 +0200
@@ -3,7 +3,8 @@
 import gtk
 import gettext
 
-from tryton.common import get_toplevel_window, IconFactory
+from tryton.common import (get_toplevel_window, IconFactory,
+    timezoned_date, untimezoned_date)
 from tryton.common.datetime_ import date_parse
 from tryton.common.datetime_strftime import datetime_strftime
 from tryton.common.underline import set_underline
@@ -59,7 +60,8 @@
             active = 0
         list_store.append(('', ''))
         for i, (rev, id_, name) in enumerate(revisions, 1):
-            list_store.append((datetime_strftime(rev, self._format), name))
+            list_store.append(
+                (datetime_strftime(timezoned_date(rev), self._format), name))
             if rev == revision:
                 active = i
         combobox.set_active(active)
@@ -94,7 +96,7 @@
         value = None
         if text:
             try:
-                value = date_parse(text, self._format)
+                value = untimezoned_date(date_parse(text, self._format))
             except ValueError:
                 pass
         self._value = value

Reply via email to