From 918bd83cd42c1f6ebef2e5aa3bcc3ad658500f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 14 Jun 2008 12:35:23 +0200 Subject: [PATCH] Remove call to mx.DateTime.strptime for version 3.0 --- tryton/gui/window/view_form/view/graph_gtk/graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/graph_gtk/graph.py b/tryton/gui/window/view_form/view/graph_gtk/graph.py index 0be8d7c233..f971c5fa38 100644 --- a/tryton/gui/window/view_form/view/graph_gtk/graph.py +++ b/tryton/gui/window/view_form/view/graph_gtk/graph.py @@ -355,8 +355,8 @@ class Graph(gtk.DrawingArea): self.datas[x][key] += \ float(model[yfield['name']].get(model)) if isinstance(minx, datetime.date): - date = mx.DateTime.strptime(str(minx), '%Y-%m-%d') - end_date = mx.DateTime.strptime(str(maxx), '%Y-%m-%d') + date = mx.DateTime.mktime(time.strptime(str(minx), '%Y-%m-%d')) + end_date = mx.DateTime.mktime(time.strptime(str(maxx), '%Y-%m-%d')) while date <= end_date: key = datetime.date(date.year, date.month, date.day) self.labels[key] = time.strftime(locale.nl_langinfo(