mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-16 03:02:37 +03:00
Update rest_framework/utils/timezone.py
This commit is contained in:
parent
2f288fc40a
commit
56b4ce26eb
|
@ -18,6 +18,6 @@ def datetime_ambiguous(dt):
|
|||
)
|
||||
|
||||
|
||||
def valid_datetime(dt) -> bool:
|
||||
def valid_datetime(dt):
|
||||
"""Returns True if the datetime is not ambiguous or imaginary, False otherwise."""
|
||||
return isinstance(dt.tzinfo, tzinfo) and not datetime_ambiguous(dt)
|
||||
|
|
Loading…
Reference in New Issue
Block a user