web/request.py
changeset 10304 b6c55274135a
parent 10276 ffb269e60348
child 10305 937deb71a681
equal deleted inserted replaced
10303:593e63a68429 10304:b6c55274135a
   809         """If the HTTP header If-modified-since is set, return the equivalent
   809         """If the HTTP header If-modified-since is set, return the equivalent
   810         date time value (GMT), else return None
   810         date time value (GMT), else return None
   811         """
   811         """
   812         mtime = self.get_header('If-modified-since', raw=False)
   812         mtime = self.get_header('If-modified-since', raw=False)
   813         if mtime:
   813         if mtime:
   814             # :/ twisted is returned a localized time stamp
   814             return datetime.utcfromtimestamp(mtime)
   815             return datetime.fromtimestamp(mtime) + GMTOFFSET
       
   816         return None
   815         return None
   817 
   816 
   818     ### outcoming headers
   817     ### outcoming headers
   819     def set_header(self, header, value, raw=True):
   818     def set_header(self, header, value, raw=True):
   820         """set an output HTTP header"""
   819         """set an output HTTP header"""