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

Comment (by mbertheau):

 I think handling AmbiguousTimeError in dateformat essentially means we're
 making a business logic decision on behalf of the implementor that we
 shouldn't make for him - his business logic might dictate a different
 decision.

 Instead the template code should handle AmbiguousTimeError and silently
 return an empty string.

 Kudos for fixing the root issue where a naive datetime was put in the
 context :) This part can surely be commit separately, because it solves
 the first problem that the technical 500 page doesn't work during DST
 change.

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

Reply via email to