#23714: Django-1.7 doesn't display 500 error pages during DST change
---------------------------------+------------------------------------
     Reporter:  mbertheau        |                    Owner:  nobody
         Type:  Bug              |                   Status:  closed
    Component:  Template system  |                  Version:  1.7
     Severity:  Normal           |               Resolution:  invalid
     Keywords:                   |             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):

 * cc: tomas.ehrlich@… (added)
 * status:  new => closed
 * resolution:   => invalid


Comment:

 I can't reproduce this bug at all.

 The debug page formats `datetime.datetime.now()` with `{{
 server_time|date:'r' }}`. Date format `r` is equivalent to `D, j M Y H:i:s
 O` as seen in traceback and `O` call `Z` whitch causes the exception. I
 tried to simply format datetime from traceback, but I didn't get any
 exception:


 {{{#!python

 from django.conf import settings
 settings.configure(USE_TZ=True, TIME_ZONE='Europe/Amsterdam')  # required
 for DateFormat, doesn't raise exception for USE_TZ=False neither

 import datetime
 from django.utils.dateformat import DateFormat

 try:
     DateFormat(datetime.datetime(2014, 10, 26, 2, 30)).format('Z')
     DateFormat(datetime.datetime(2014, 10, 26, 2, 30,
 tzinfo=None)).format('Z')
 except AmiguousTimeError:
     pass
 else:
     print('Exception wasn't raised')

 # Exception wasn't raised...
 }}}

 There seems to be missing information about timezone, which makes
 date&time 2014-10-26 2:30 really ambiguous, but even when I try to format
 timezone-naive datetime, it never raises exception.

 This bug can actually affects debug page only once a year, when the time
 is switched back by one hour. So it's after all just 1/4380 of the year ;)


 Could you please provide more information? What TIME_ZONE, USE_TZ settings
 do you use and etc.

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

Reply via email to