From 6ee70ea219659a8ae45a391dca702a22d7b733ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 9 Mar 2012 23:06:56 +0100 Subject: [PATCH] Calendar popup must use timezoned date issue2486 --- tryton/gui/window/view_form/view/form_gtk/calendar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/calendar.py b/tryton/gui/window/view_form/view/form_gtk/calendar.py index b4e8b91e0a..b241319e96 100644 --- a/tryton/gui/window/view_form/view/form_gtk/calendar.py +++ b/tryton/gui/window/view_form/view/form_gtk/calendar.py @@ -5,7 +5,7 @@ import datetime import gtk import gettext from interface import WidgetInterface -from tryton.common import HM_FORMAT, TRYTON_ICON +from tryton.common import HM_FORMAT, TRYTON_ICON, timezoned_date from tryton.common import date_widget, Tooltips, get_toplevel_window from tryton.translate import date_format @@ -165,6 +165,7 @@ class DateTime(Calendar): self.set_value(self.record, self.field) val = self.field.get(self.record) if val: + val = timezoned_date(val) widget_hour.set_value(val.hour) widget_minute.set_value(val.minute) cal.select_month(val.month - 1, val.year)