Kaydet (Commit) 939af5a6 authored tarafından Aymeric Augustin's avatar Aymeric Augustin

Fixed a typo in a comment. Refs #17742.

üst 314d82a9
......@@ -678,7 +678,7 @@ class DateField(Field):
return value
if isinstance(value, datetime.datetime):
if settings.USE_TZ and timezone.is_aware(value):
# Convert aware datetimes to the current time zone
# Convert aware datetimes to the default time zone
# before casting them to dates (#17742).
default_timezone = timezone.get_default_timezone()
value = timezone.make_naive(value, default_timezone)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment