From d73c3611320c58e0a572f07af77c6fc6ad6bb59a Mon Sep 17 00:00:00 2001 From: Mike Edmunds Date: Fri, 22 Sep 2023 10:51:09 -0700 Subject: [PATCH] Fix Python 5.0 deprecation warning --- anymail/backends/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anymail/backends/base.py b/anymail/backends/base.py index 0168fe12..87bbf1e2 100644 --- a/anymail/backends/base.py +++ b/anymail/backends/base.py @@ -462,7 +462,7 @@ def aware_datetime(self, value): dt = datetime(value.year, value.month, value.day) # naive, midnight else: try: - dt = datetime.utcfromtimestamp(value).replace(tzinfo=timezone.utc) + dt = datetime.fromtimestamp(value, timezone.utc) except (TypeError, ValueError): return value if is_naive(dt):