Opened 2 years ago

Closed 23 months ago

Last modified 23 months ago

#20409 closed Cleanup/optimization (fixed)

Investigate how unique_for_date works with DateTimeFields when USE_TZ is True

Reported by: aaugustin Owned by: aaugustin
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 2 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 2 years ago by akaariai

  • Triage Stage changed from Unreviewed to Accepted

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

  • Resolution set to fixed
  • Status changed from assigned to closed

In e192739b3e3209a371a5d0f5f05fd083e88259f2:

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

comment:4 Changed 23 months 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