--- a/etwist/request.py Mon Mar 09 12:12:53 2009 +0100
+++ b/etwist/request.py Tue Mar 10 11:35:52 2009 +0100
@@ -1,14 +1,14 @@
"""Twisted request handler for CubicWeb
:organization: Logilab
-:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
__docformat__ = "restructuredtext en"
-from twisted.web2 import http, http_headers
+from datetime import datetime
-from mx.DateTime import DateTimeFromTicks
+from twisted.web2 import http, http_headers
from cubicweb.web import DirectResponse
from cubicweb.web.request import CubicWebRequestBase
@@ -117,7 +117,7 @@
mtime = self.get_header('If-modified-since', raw=False)
if mtime:
# :/ twisted is returned a localized time stamp
- return DateTimeFromTicks(mtime) + GMTOFFSET
+ return datetime.fromtimestamp(mtime) + GMTOFFSET
return None