#29884: QuerySet.filter() with TruncBase functions not working as expected when USE_TZ= True -------------------------------------+------------------------------------- Reporter: slide333333 | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 2.1 (models, ORM) | Severity: Normal | Resolution: Keywords: | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | 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. tim I can, but I am wondering about the use of timezone within the database. I know that Django uses Oracle's DATE type, which is not timezone aware. The same has got to be true for sqlite3. Really, the timezone in use for Oracle DATE types is the timezone for the process running Oracle. Also, evaluating the submission, it is clear that TruncDay still returns a datetime.datetime, which I would expect. I will go directly to that once I understand which types Django uses for each of these. I'm on the track to do this sometime tonight. -- Ticket URL: <https://code.djangoproject.com/ticket/29884#comment:6> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.f11bea4894262615d2497240d4ebe81f%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.