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
7f27675d62
commit
6ff2cede19
|
@ -1,7 +1,7 @@
|
||||||
from datetime import datetime, timezone, tzinfo
|
from datetime import datetime, timezone, tzinfo
|
||||||
|
|
||||||
|
|
||||||
def datetime_exists(dt) -> bool:
|
def datetime_exists(dt):
|
||||||
"""Check if a datetime exists. Taken from: https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html"""
|
"""Check if a datetime exists. Taken from: https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html"""
|
||||||
# There are no non-existent times in UTC, and comparisons between
|
# There are no non-existent times in UTC, and comparisons between
|
||||||
# aware time zones always compare absolute times; if a datetime is
|
# aware time zones always compare absolute times; if a datetime is
|
||||||
|
|
Loading…
Reference in New Issue
Block a user