Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #20409 -- Clarified how unique_for_date works when USE_TZ is set.

  • Loading branch information...
commit 01edcf70f2911b1953b7789bda18d2498fc73bd0 1 parent be9930d
Aymeric Augustin authored September 07, 2013

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  docs/ref/models/fields.txt
4  docs/ref/models/fields.txt
@@ -291,7 +291,9 @@ For example, if you have a field ``title`` that has
291 291
 records with the same ``title`` and ``pub_date``.
292 292
293 293
 Note that if you set this to point to a :class:`DateTimeField`, only the date
-portion of the field will be considered.
+portion of the field will be considered. Besides, when :setting:`USE_TZ` is
+``True``, the check will be performed in the :ref:`current time zone
+<default-current-time-zone>` at the time the object gets saved.
295 297
296 298
 This is enforced by :meth:`Model.validate_unique()` during model validation
297 299
 but not at the database level. If any :attr:`~Field.unique_for_date` constraint

0 notes on commit 01edcf7

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