#23714: `date` filter raises an exception for naive datetimes during DST change
---------------------------------+------------------------------------
     Reporter:  mbertheau        |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Template system  |                  Version:  1.7
     Severity:  Normal           |               Resolution:
     Keywords:  timezone         |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------
Changes (by tricoder42):

 * keywords:   => timezone


Comment:

 That's right, with installed `pytz` I can see the exception.

 Minimal code to reproduce the problem:
 {{{#!python
 from django.conf import settings
 settings.configure(USE_TZ=True, TIME_ZONE='Europe/Amsterdam')

 import datetime
 from django.utils.dateformat import DateFormat

 right_now = datetime.datetime.now().replace(2014, 10, 26, 2, 30)
 print(DateFormat(right_now).format('Z'))
 }}}

 In my opinion it's more serious because it doesn't affect just 500 debug
 page, but all templates that uses `date` filter with `r`, `O` or `Z`.

--
Ticket URL: <https://code.djangoproject.com/ticket/23714#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 [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/067.3e5d4ebd878ea8e445445e298c0def34%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to