Opened 4 years ago
Closed 4 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 , 4 years ago
Has patch: | set |
---|
comment:2 by , 4 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
PR