Update rest_framework/utils/timezone.py

This commit is contained in:
Tom Christie 2025-03-21 12:31:41 +00:00 committed by GitHub
parent 715ea1d3b9
commit 4a70c9da1c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,7 @@ def datetime_exists(dt) -> bool:
return dt.astimezone(timezone.utc) == dt return dt.astimezone(timezone.utc) == dt
def datetime_ambiguous(dt: datetime) -> bool: def datetime_ambiguous(dt) -> bool:
"""Check whether a datetime is ambiguous. Taken from: https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html""" """Check whether a datetime is ambiguous. Taken from: https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html"""
# If a datetime exists and its UTC offset changes in response to # If a datetime exists and its UTC offset changes in response to
# changing `fold`, it is ambiguous in the zone specified. # changing `fold`, it is ambiguous in the zone specified.