mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-16 11:12:21 +03:00
Update rest_framework/utils/timezone.py
This commit is contained in:
parent
6ff2cede19
commit
2f288fc40a
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user