summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-01-18 08:21:12 -0800
committerTim Graham <timograham@gmail.com>2018-01-18 11:21:12 -0500
commit3c34452ab5e5de816357aee99cd2a98a0c7c4e50 (patch)
tree847e1c2ffe5211eabed89ff8a3cc4b2e0919924f /django
parent65728550bd6296871562da02069ddb86e9dd3482 (diff)
Refs #23668 -- Removed passing default argument of current TZ to make_aware()/naive.
Diffstat (limited to 'django')
-rw-r--r--django/forms/utils.py3
-rw-r--r--django/views/generic/dates.py2
2 files changed, 2 insertions, 3 deletions
diff --git a/django/forms/utils.py b/django/forms/utils.py
index 9bdaffa44b..73fca86325 100644
--- a/django/forms/utils.py
+++ b/django/forms/utils.py
@@ -174,6 +174,5 @@ def to_current_timezone(value):
to naive datetimes in the current time zone for display.
"""
if settings.USE_TZ and value is not None and timezone.is_aware(value):
- current_timezone = timezone.get_current_timezone()
- return timezone.make_naive(value, current_timezone)
+ return timezone.make_naive(value)
return value
diff --git a/django/views/generic/dates.py b/django/views/generic/dates.py
index 1673a7a263..3da05cf8e5 100644
--- a/django/views/generic/dates.py
+++ b/django/views/generic/dates.py
@@ -267,7 +267,7 @@ class DateMixin:
if self.uses_datetime_field:
value = datetime.datetime.combine(value, datetime.time.min)
if settings.USE_TZ:
- value = timezone.make_aware(value, timezone.get_current_timezone())
+ value = timezone.make_aware(value)
return value
def _make_single_date_lookup(self, date):