distribution/packages/lang/Python3/patches/Python3-0400-fix-bpo5537.patch
fewtarius b2d76a6e53
* Deprecate and remove Python2 thanks to @CoreELEC as an upstream.
* Optimize mupen64plus, plus-nx, and yabasanshiro a bit
* Misc OS updates and bug fixes.
2022-02-27 18:34:12 -05:00

22 lines
816 B
Diff

From 7c35472bc734876f940fdc71090ad3d526e95a82 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Fri, 14 Feb 2020 01:33:34 +0000
Subject: [PATCH] Fix issue 5537 - regression on 32-bit
https://bugs.python.org/issue5537
https://forum.kodi.tv/showthread.php?tid=343068&pid=2923934#pid2923934
---
Lib/http/cookiejar.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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)