mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Fix Python 3.12 deprecation warning
This commit is contained in:
@@ -462,7 +462,7 @@ class BasePayload:
|
|||||||
dt = datetime(value.year, value.month, value.day) # naive, midnight
|
dt = datetime(value.year, value.month, value.day) # naive, midnight
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
dt = datetime.utcfromtimestamp(value).replace(tzinfo=timezone.utc)
|
dt = datetime.fromtimestamp(value, timezone.utc)
|
||||||
except (TypeError, ValueError):
|
except (TypeError, ValueError):
|
||||||
return value
|
return value
|
||||||
if is_naive(dt):
|
if is_naive(dt):
|
||||||
|
|||||||
Reference in New Issue
Block a user