Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#20409 closed Cleanup/optimization (fixed)

Investigate how unique_for_date works with DateTimeFields when USE_TZ is True

Reported by: Aymeric Augustin Owned by: Aymeric Augustin
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (4)

comment:1 Changed 4 years ago by Aymeric Augustin

Status: newassigned

comment:2 Changed 4 years ago by Anssi Kääriäinen

Triage Stage: UnreviewedAccepted

comment:3 Changed 3 years ago by Aymeric Augustin <aymeric.augustin@…>

Resolution: fixed
Status: assignedclosed

In e192739b3e3209a371a5d0f5f05fd083e88259f2:

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

comment:4 Changed 3 years ago by Aymeric Augustin <aymeric.augustin@…>

In 01edcf70f2911b1953b7789bda18d2498fc73bd0:

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

Note: See TracTickets for help on using tickets.
Back to Top