Skip to content
This repository

HTTPS clone URL

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 e192739b3e3209a371a5d0f5f05fd083e88259f2 1 parent 31e16c1
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
@@ -300,7 +300,9 @@ For example, if you have a field ``title`` that has
300 300
 records with the same ``title`` and ``pub_date``.
301 301
 
302 302
 Note that if you set this to point to a :class:`DateTimeField`, only the date
303  
-portion of the field will be considered.
  303
+portion of the field will be considered. Besides, when :setting:`USE_TZ` is
  304
+``True``, the check will be performed in the :ref:`current time zone
  305
+<default-current-time-zone>` at the time the object gets saved.
304 306
 
305 307
 This is enforced by :meth:`Model.validate_unique()` during model validation
306 308
 but not at the database level. If any :attr:`~Field.unique_for_date` constraint

0 notes on commit e192739

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