mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-16 19:22:24 +03:00
Update rest_framework/utils/timezone.py
This commit is contained in:
parent
715ea1d3b9
commit
4a70c9da1c
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user