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
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user