Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[1.6.x] Fixed typo and slightly improved error message when db is mis…

…sing time zone definitions.

Refs #21432.

Backport of 32e7580 from master
  • Loading branch information...
1 parent 0e81383 commit 3bb7de8c7c3f9d5de5426d94f45fe83b5d998357 @loic loic committed with timgraham
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/sql/
4 django/db/models/sql/
@@ -1105,8 +1105,8 @@ def results_iter(self):
if settings.USE_TZ:
if datetime is None:
raise ValueError("Database returned an invalid value "
- "in QuerySet.dates(). Are time zone "
- "definitions and pytz installed?")
+ "in QuerySet.datetimes(). Are time zone "
+ "definitions for your database and pytz installed?")
datetime = datetime.replace(tzinfo=None)
datetime = timezone.make_aware(datetime, self.query.tzinfo)
yield datetime

0 comments on commit 3bb7de8

Please sign in to comment.
Something went wrong with that request. Please try again.