etwist/request.py
branchstable
changeset 4425 b9913205d91e
parent 4212 ab6573088b4a
child 5155 1dea6e0fdfc1
child 5421 8167de96c523
equal deleted inserted replaced
4424:5a5cd7591706 4425:b9913205d91e
   111             lang = lang.split('-')[0]
   111             lang = lang.split('-')[0]
   112             yield lang
   112             yield lang
   113 
   113 
   114     def header_if_modified_since(self):
   114     def header_if_modified_since(self):
   115         """If the HTTP header If-modified-since is set, return the equivalent
   115         """If the HTTP header If-modified-since is set, return the equivalent
   116         mx date time value (GMT), else return None
   116         date time value (GMT), else return None
   117         """
   117         """
   118         mtime = self.get_header('If-modified-since', raw=False)
   118         mtime = self.get_header('If-modified-since', raw=False)
   119         if mtime:
   119         if mtime:
   120             # :/ twisted is returned a localized time stamp
   120             # :/ twisted is returned a localized time stamp
   121             return datetime.fromtimestamp(mtime) + GMTOFFSET
   121             return datetime.fromtimestamp(mtime) + GMTOFFSET