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
4a70c9da1c
commit
7f27675d62
|
@ -18,6 +18,6 @@ def datetime_ambiguous(dt) -> bool:
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def valid_datetime(dt: datetime) -> bool:
|
def valid_datetime(dt) -> bool:
|
||||||
"""Returns True if the datetime is not ambiguous or imaginary, False otherwise."""
|
"""Returns True if the datetime is not ambiguous or imaginary, False otherwise."""
|
||||||
return isinstance(dt.tzinfo, tzinfo) and not datetime_ambiguous(dt)
|
return isinstance(dt.tzinfo, tzinfo) and not datetime_ambiguous(dt)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user