Issue #27466: Change time format returned by http.cookie.time2netscape,

confirming the netscape cookie format.
This commit is contained in:
Senthil Kumaran 2016-07-10 06:45:38 -07:00
parent 1a2b24f02d
commit d5b47fb8ce
3 changed files with 27 additions and 1 deletions

View file

@ -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)