Author vstinner
Recipients Alex Quinn, belopolsky, hollec, jjlee, nmacleod, python-dev, vstinner
Date 2020-02-13.22:00:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581631260.23.0.206113914856.issue5537@roundup.psfhosted.org>
In-reply-to
Content
Oh, maybe the bug wasn't properly fixed?

Can you please try the patch above?

diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py
index 47ed5c3d64..55915cf18a 100644
--- a/Lib/http/cookiejar.py
+++ b/Lib/http/cookiejar.py
@@ -99,7 +99,7 @@ def time2isoz(t=None):
     if t is None:
         dt = datetime.datetime.utcnow()
     else:
-        dt = datetime.datetime.utcfromtimestamp(t)
+        dt = datetime.datetime(1970, 1, 1) + datetime.timedelta(seconds=t)
     return "%04d-%02d-%02d %02d:%02d:%02dZ" % (
         dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second)
 

For example, copy http/ subdirectory in the current directory, and then patch manually http/cookiejar.py file.
History
Date User Action Args
2020-02-13 22:01:00vstinnersetrecipients: + vstinner, jjlee, belopolsky, hollec, Alex Quinn, python-dev, nmacleod
2020-02-13 22:01:00vstinnersetmessageid: <1581631260.23.0.206113914856.issue5537@roundup.psfhosted.org>
2020-02-13 22:01:00vstinnerlinkissue5537 messages
2020-02-13 22:00:59vstinnercreate