etwist/request.py
changeset 4436 294e084f1263
parent 4425 b9913205d91e
child 5155 1dea6e0fdfc1
child 5421 8167de96c523
equal deleted inserted replaced
4434:101344a6ff9b 4436:294e084f1263
   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