#27475: Bug in admin with date_hierarchy and Daylight savings
-------------------------------+--------------------------------------
Reporter: Hugo Tácito | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.10
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 Hugo Tácito):
Hello Tim,
I'm sorry for my lack of information and clarity, but even if I do have an
existing datetime the problem still occur.
For example I have a User with date_joined equals 2016-10-16
12:17:44.270221-03 and when I select a date_hierarchy filter, that still
raise the same exception of:
NonExistentTimeError at /admin/auth/user/
2016-10-16 00:00:00
Even with an existing datetime.
The admin I did to test:
{{{
class UserAdmin(admin.ModelAdmin):
date_hierarchy = 'date_joined'
list_display = ('email', 'first_name', 'last_name', 'date_joined')
list_filter = ('is_staff', 'is_superuser')
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
}}}
The internationalization settings:
{{{
LANGUAGE_CODE = 'pt-br'
TIME_ZONE = 'America/Sao_Paulo'
USE_I18N = True
USE_L10N = True
USE_TZ = True
}}}
With TIME_ZONE = 'UTC' the problem doesn't occur.
--
Ticket URL: <https://code.djangoproject.com/ticket/27475#comment:2>
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/068.61895700a9c0636f47964a37a1234aff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.