Opened 4 years ago

Closed 3 years ago

#32722 closed Bug (fixed)

Comparing to TruncTime() doesn't work on Oracle.

Reported by: Mariusz Felisiak Owned by: Mariusz Felisiak
Component: Database layer (models, ORM) Version: 3.2
Severity: Normal Keywords: oracle ttrunctime
Cc: Simon Charette Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Comparing to TruncTime() doesn't work on Oracle because we don't change the date part to 1900-01-01 (which is set for TimeFields), e.g.

.filter(start_datetime__time=start_datetime.time())

is translated to

"DB_FUNCTIONS_DTMODEL"."START_DATETIME" = 1900-01-01 14:30:26.000321

which cannot work because start_datetime == datetime(2015, 6, 15, 14, 30, 26, 321).

Noticed when checking #32699.

Change History (3)

comment:1 by Mariusz Felisiak, 4 years ago

Has patch: set

comment:2 by Carlton Gibson, 3 years ago

Triage Stage: UnreviewedReady for checkin

comment:3 by Carlton Gibson <carlton@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In b1a4b1f:

Fixed #32722 -- Fixed comparing to TruncTime() on Oracle.

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