From 6ff2cede191fb1eb41b6cadffc354f3bb07abaf8 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 21 Mar 2025 12:32:53 +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 d69ee7c52..6e78f7b16 100644 --- a/rest_framework/utils/timezone.py +++ b/rest_framework/utils/timezone.py @@ -1,7 +1,7 @@ from datetime import datetime, timezone, tzinfo -def datetime_exists(dt) -> bool: +def datetime_exists(dt): """Check if a datetime exists. Taken from: https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html""" # There are no non-existent times in UTC, and comparisons between # aware time zones always compare absolute times; if a datetime is