void-packages/srcpkgs/python3-dateutil/patches/avoid-deprecated-utcfromtim...

26 lines
707 B
Diff

Taken from https://github.com/dateutil/dateutil/pull/1285
From f2293200747fb03d56c6c5997bfebeabe703576f Mon Sep 17 00:00:00 2001
From: Thomas Grainger <tagrain@gmail.com>
Date: Fri, 2 Jun 2023 14:06:41 +0100
Subject: [PATCH 1/2] avoid deprecated utcfromtimestamp
Fixes #1284
---
src/dateutil/tz/tz.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/dateutil/tz/tz.py b/src/dateutil/tz/tz.py
index c67f56d46..617591446 100644
--- a/dateutil/tz/tz.py
+++ b/dateutil/tz/tz.py
@@ -34,7 +34,7 @@
from warnings import warn
ZERO = datetime.timedelta(0)
-EPOCH = datetime.datetime.utcfromtimestamp(0)
+EPOCH = datetime.datetime(1970, 1, 1, 0, 0)
EPOCHORDINAL = EPOCH.toordinal()