#34699: Filtering on annotated TruncSecond expression gives unexpected result.
-------------------------------------+-------------------------------------
Reporter: Stefan | Owner: Wes P.
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia Bidart):
Replying to [comment:19 Wes P.]:
> Thanks for responding to the PR. I look forward to the feedback.
>
> I tried running the test you describe in your comment and I also had
errors.
>
> I was wondering about the line:
> > {{{ with (self.settings(USE_TZ=True, TIME_ZONE="UTC"),
self.subTest(kind=kind, tz=tz)) }}}
> It seems like it would always assume that we are using the UTC timezone
instead of switching to the value in tz. I modified your test running it
twice, first in the UTC timezone only but using tzinfo and the second time
adjusting the `TIME_ZONE` value in the settings without using tzinfo.
Great catch Wes, my test should have:
{{{ with (self.settings(USE_TZ=True, TIME_ZONE=tz),
self.subTest(kind=kind, tz=tz)) }}}
I had a typo there from multiple refactors. So now I need to review again
my understanding of the issue, because I convinced myself that the docs
were incorrect (vs having some minor issues, which seem to be the case).
Do you have further thoughts on how to proceed based on these findings?
--
Ticket URL: <https://code.djangoproject.com/ticket/34699#comment:20>
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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070196174acf86-aa43ee82-1387-42de-86a5-deede80efdc9-000000%40eu-central-1.amazonses.com.