[Django] #20409: Investigate how unique_for_date works with DateTimeFields when USE_TZ is True

10 views
Skip to first unread message

Django

unread,
May 15, 2013, 10:53:18 AM5/15/13
to django-...@googlegroups.com
#20409: Investigate how unique_for_date works with DateTimeFields when USE_TZ is
True
----------------------------------------------+-----------------------
Reporter: aaugustin | Owner: aaugustin
Type: Cleanup/optimization | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+-----------------------
I'm not convinced `unique_for_date` works with `DateTimeField` when
`USE_TZ = True`.

In general I'm highly skeptical of APIs that accept dates or datetimes
indifferently; they don't work well in a timezone-aware world.

--
Ticket URL: <https://code.djangoproject.com/ticket/20409>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 15, 2013, 10:53:43 AM5/15/13
to django-...@googlegroups.com
#20409: Investigate how unique_for_date works with DateTimeFields when USE_TZ is
True
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: aaugustin
Type: | Status: assigned
Cleanup/optimization | Version: master
Component: Database layer | Resolution:
(models, ORM) | Triage Stage:
Severity: Normal | Unreviewed
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/20409#comment:1>

Django

unread,
May 22, 2013, 1:42:34 AM5/22/13
to django-...@googlegroups.com
#20409: Investigate how unique_for_date works with DateTimeFields when USE_TZ is
True
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: aaugustin

Type: | Status: assigned
Cleanup/optimization | Version: master
Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by akaariai):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/20409#comment:2>

Django

unread,
Sep 7, 2013, 3:09:42 PM9/7/13
to django-...@googlegroups.com
#20409: Investigate how unique_for_date works with DateTimeFields when USE_TZ is
True
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: aaugustin
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Database layer | Resolution: fixed

(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by Aymeric Augustin <aymeric.augustin@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"e192739b3e3209a371a5d0f5f05fd083e88259f2"]:
{{{
#!CommitTicketReference repository=""
revision="e192739b3e3209a371a5d0f5f05fd083e88259f2"
Fixed #20409 -- Clarified how unique_for_date works when USE_TZ is set.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20409#comment:3>

Django

unread,
Sep 7, 2013, 3:10:03 PM9/7/13
to django-...@googlegroups.com
#20409: Investigate how unique_for_date works with DateTimeFields when USE_TZ is
True
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: aaugustin

Type: | Status: closed
Cleanup/optimization | Version: master
Component: Database layer | Resolution: fixed
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by Aymeric Augustin <aymeric.augustin@…>):

In [changeset:"01edcf70f2911b1953b7789bda18d2498fc73bd0"]:
{{{
#!CommitTicketReference repository=""
revision="01edcf70f2911b1953b7789bda18d2498fc73bd0"


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

--
Ticket URL: <https://code.djangoproject.com/ticket/20409#comment:4>

Reply all
Reply to author
Forward
0 new messages