#29724: Admin date_hierarchy filter by month displays an extra day
-------------------------------+------------------------------------
     Reporter:  Lavrenov Ivan  |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  contrib.admin  |                  Version:  master
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  1
-------------------------------+------------------------------------
Changes (by Carlton Gibson):

 * version:  2.0 => master
 * stage:  Unreviewed => Accepted


Comment:

 Yes. I can reproduce this.

 1. Have a DateTimeField in `date_hierarchy` (and optionally `list_display)
 2. Create an object in the DB for midnight 1st Sep (UTC).
 3. Set project TIME_ZONE = 'America/Los_Angeles'

 * Test object is show in list at Aug 31 5PM.
 * Date hierarchy choice is created for 1st September
 * Link for that is incorrect:
 `?<field>__day=1&<field>__month=8&<field>__year=2018`, i.e. Aug 1st.

 Presumably error is in
 
[https://github.com/django/django/blob/231c595bde342e507091167387fba7ba1882b9c9/django/contrib/admin/templatetags/admin_list.py#L354
 `date_hierarchy()` template tag function].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29724#comment:5>
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/067.d87f4055a1bf82e79237d38ab9c7a239%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to