From 2f288fc40ad916f7933f3468f9cbe238f8392dd7 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 21 Mar 2025 12:32:58 +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 6e78f7b16..3fb34c8fa 100644 --- a/rest_framework/utils/timezone.py +++ b/rest_framework/utils/timezone.py @@ -9,7 +9,7 @@ def datetime_exists(dt): return dt.astimezone(timezone.utc) == dt -def datetime_ambiguous(dt) -> bool: +def datetime_ambiguous(dt): """Check whether a datetime is ambiguous. Taken from: https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html""" # If a datetime exists and its UTC offset changes in response to # changing `fold`, it is ambiguous in the zone specified.