summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/utils.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/django/forms/utils.py b/django/forms/utils.py
index 905babce4d..7577c0bbda 100644
--- a/django/forms/utils.py
+++ b/django/forms/utils.py
@@ -215,9 +215,7 @@ def from_current_timezone(value):
if settings.USE_TZ and value is not None and timezone.is_naive(value):
current_timezone = timezone.get_current_timezone()
try:
- if not timezone._is_pytz_zone(
- current_timezone
- ) and timezone._datetime_ambiguous_or_imaginary(value, current_timezone):
+ if timezone._datetime_ambiguous_or_imaginary(value, current_timezone):
raise ValueError("Ambiguous or non-existent time.")
return timezone.make_aware(value, current_timezone)
except Exception as exc: