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