Skip to content

Commit 2e793cb

Browse files
committed
Fix incorrect timezone of -0000. Use GMT instead. Error found using redbot
1 parent 379ebf7 commit 2e793cb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ Fixed:
159159
Rouillard)
160160
- report basename of filename when template file is invalid
161161
rather than reporting a TypeError. (John Rouillard)
162+
- Make Last-Modified header use GMT not -0000 timezone. Fix error
163+
reported by redbot testing. (John Rouillard)
162164

163165
Features:
164166

roundup/cgi/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,8 @@ def _serve_file(self, lmt, mime_type, content=None, filename=None):
19841984
"""
19851985

19861986
# spit out headers
1987-
self.additional_headers['Last-Modified'] = email.utils.formatdate(lmt)
1987+
self.additional_headers['Last-Modified'] = email.utils.formatdate(lmt,
1988+
usegmt=True)
19881989

19891990
ims = None
19901991
# see if there's an if-modified-since...

0 commit comments

Comments
 (0)