Skip to content

Commit

Permalink
Fix Python 5.0 deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
medmunds committed Sep 22, 2023
1 parent 22523dc commit d73c361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anymail/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d73c361

Please sign in to comment.