# HG changeset patch # User Julien Cristau # Date 1427355287 -3600 # Node ID b6c55274135aa46a82f4dd274146db48acec490b # Parent 593e63a684295bba522c44d9c5e4547af2364676 [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. diff -r 593e63a68429 -r b6c55274135a web/request.py --- 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