Fix Python 3.12 deprecation warning

This commit is contained in:
Mike Edmunds
2023-09-22 10:51:09 -07:00
parent 97fe8162bf
commit f911ee78a0

View File

@@ -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):