web/views/timeline.py
branchstable
changeset 6372 4c3e2a92e340
parent 5940 0e3ae19b181a
child 8190 2a3c1b787688
--- a/web/views/timeline.py	Thu Sep 30 15:00:30 2010 +0200
+++ b/web/views/timeline.py	Fri Oct 01 09:25:39 2010 +0200
@@ -23,6 +23,7 @@
 __docformat__ = "restructuredtext en"
 
 from logilab.mtconverter import xml_escape
+from logilab.common.date import ustrftime
 
 from cubicweb.selectors import adaptable
 from cubicweb.view import EntityView, StartupView
@@ -80,7 +81,7 @@
         start = start or stop
         if start is None and stop is None:
             return None
-        event_data = {'start': start.strftime(self.date_fmt),
+        event_data = {'start': ustrftime(start, self.date_fmt),
                       'title': xml_escape(entity.dc_title()),
                       'description': entity.dc_description(format='text/html'),
                       'link': entity.absolute_url(),
@@ -89,7 +90,7 @@
         if onclick:
             event_data['onclick'] = onclick
         if stop:
-            event_data['end'] = stop.strftime(self.date_fmt)
+            event_data['end'] = ustrftime(stop, self.date_fmt)
         return event_data