mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
[merge from 3.5] - Issue #27466: Change time format returned by
http.cookie.time2netscape, confirming the netscape cookie format.
This commit is contained in:
commit
290b42de73
3 changed files with 27 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ def time2netscape(t=None):
|
|||
dt = datetime.datetime.utcnow()
|
||||
else:
|
||||
dt = datetime.datetime.utcfromtimestamp(t)
|
||||
return "%s %02d-%s-%04d %02d:%02d:%02d GMT" % (
|
||||
return "%s, %02d-%s-%04d %02d:%02d:%02d GMT" % (
|
||||
DAYS[dt.weekday()], dt.day, MONTHS[dt.month-1],
|
||||
dt.year, dt.hour, dt.minute, dt.second)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue