#29884: QuerySet.filter() with TruncBase functions not working as expected when
USE_TZ= True
-------------------------------------+-------------------------------------
Reporter: slide333333 | Owner: Dan Davis
Type: Bug | Status: assigned
Component: Database layer | Version: 2.1
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Dan Davis):
Replying to [comment:5 Tim Graham]:
> Can you provide tests for
`tests/db_functions/datetime/test_extract_trunc.py`? It would be easier to
evaluate the ticket with a patch.
After looking at this more deeply, a solution is proposed for PostgreSQL,
and the problem also appears in multiple backends. `TruncBase` delegates
to the backend to do this, calling `connection.ops.datetime_trunc_sql` for
target fields that are datetime fields. I don't see any specific backend
tests for datetime truncation, but I see that
see`test/backends/base/test_operations.py` might be a good place. I do
not see how backend specific tests are invoked, but I see some with skips.
--
Ticket URL: <https://code.djangoproject.com/ticket/29884#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.d1fb01dd01240b824ef720025a9f841f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.