Fixed a typo in a comment. Refs #17742.

This commit is contained in:
Aymeric Augustin 2012-06-01 08:09:58 +02:00
parent 314d82a94e
commit 939af5a654
1 changed files with 1 additions and 1 deletions

View File

@ -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)