Skip to content

Commit

Permalink
Merge pull request #1285 from graingert/patch-1
Browse files Browse the repository at this point in the history
avoid deprecated utcfromtimestamp
  • Loading branch information
pganssle committed Jun 6, 2023
2 parents 89df6ea + bfd8260 commit 296d419
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/1284.bugfix.rst
@@ -0,0 +1 @@
Removed a call to ``datetime.utcfromtimestamp``, which is deprecated as of Python 3.12. Reported by Hugo van Kemenade (gh pr #1284), fixed by Thomas Grainger (gh pr #1285).
2 changes: 1 addition & 1 deletion src/dateutil/tz/tz.py
Expand Up @@ -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()


Expand Down

0 comments on commit 296d419

Please sign in to comment.