diff --git a/srcpkgs/python3-dateutil/patches/avoid-deprecated-utcfromtimestamp.patch b/srcpkgs/python3-dateutil/patches/avoid-deprecated-utcfromtimestamp.patch new file mode 100644 index 00000000000..9ac4acc8994 --- /dev/null +++ b/srcpkgs/python3-dateutil/patches/avoid-deprecated-utcfromtimestamp.patch @@ -0,0 +1,25 @@ +Taken from https://github.com/dateutil/dateutil/pull/1285 + +From f2293200747fb03d56c6c5997bfebeabe703576f Mon Sep 17 00:00:00 2001 +From: Thomas Grainger +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() + + diff --git a/srcpkgs/python3-dateutil/template b/srcpkgs/python3-dateutil/template index 1d86829608a..c5b2ad5b03e 100644 --- a/srcpkgs/python3-dateutil/template +++ b/srcpkgs/python3-dateutil/template @@ -1,7 +1,7 @@ # Template file for 'python3-dateutil' pkgname=python3-dateutil version=2.8.2 -revision=3 +revision=4 build_style=python3-module hostmakedepends="python3-setuptools_scm" depends="python3-six tzdata"