Update rest_framework/utils/timezone.py

This commit is contained in:
Tom Christie 2025-03-21 12:32:58 +00:00 committed by GitHub
parent 6ff2cede19
commit 2f288fc40a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,7 @@ def datetime_exists(dt):
return dt.astimezone(timezone.utc) == dt return dt.astimezone(timezone.utc) == dt
def datetime_ambiguous(dt) -> bool: def datetime_ambiguous(dt):
"""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.