From 56b4ce26eb440052ee70f0340dbef0996df8e30a Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 21 Mar 2025 12:33:03 +0000 Subject: [PATCH] Update rest_framework/utils/timezone.py --- rest_framework/utils/timezone.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/utils/timezone.py b/rest_framework/utils/timezone.py index 3fb34c8fa..e4cf5b022 100644 --- a/rest_framework/utils/timezone.py +++ b/rest_framework/utils/timezone.py @@ -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)