#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):

 Reading the code more closely, I'm convinced, that the correct fix is to
 change TimeFormat.Z to return an empty string if given a naive datetime.
 This is in line with python's strftime, which exhibits the same behaviour.

 If you agree, then the scope of this is actually bigger: TimeFormat
 shouldn't make up a timezone for anything, if given a naive datetime. This
 then concerns TimeFormat.e, TimeFormat.O, TimeFormat.T, TimeFormat.Z and
 DateFormat.I.

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

Reply via email to