mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #27466: Change time format returned by http.cookie.time2netscape,
confirming the netscape cookie format.
This commit is contained in:
parent
1a2b24f02d
commit
d5b47fb8ce
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