diff --git a/rest_framework/utils/timezone.py b/rest_framework/utils/timezone.py index b1fbd9ebe..d69ee7c52 100644 --- a/rest_framework/utils/timezone.py +++ b/rest_framework/utils/timezone.py @@ -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.""" return isinstance(dt.tzinfo, tzinfo) and not datetime_ambiguous(dt)