[web/request] don't play tricks with utc offset
We need an UTC datetime from a time.time()-type value. It turns out
datetime provides a method to do just that. Related to #2154655.
--- a/web/request.py Wed Mar 25 08:43:00 2015 +0100
+++ b/web/request.py Thu Mar 26 08:34:47 2015 +0100
@@ -811,8 +811,7 @@
"""
mtime = self.get_header('If-modified-since', raw=False)
if mtime:
- # :/ twisted is returned a localized time stamp
- return datetime.fromtimestamp(mtime) + GMTOFFSET
+ return datetime.utcfromtimestamp(mtime)
return None
### outcoming headers