#3415: django allows invalid TIME_ZONE in settings.py
-------------------------------------------------+--------------------------
          Reporter:  for...@alittletooquiet.net  |         Owner:  nobody       
                 
            Status:  new                         |     Milestone:               
                 
         Component:  Uncategorized               |       Version:  SVN          
                 
        Resolution:                              |      Keywords:  datetime 
TIME_ZONE settings.py
             Stage:  Someday/Maybe               |     Has_patch:  1            
                 
        Needs_docs:  0                           |   Needs_tests:  0            
                 
Needs_better_patch:  0                           |  
-------------------------------------------------+--------------------------
Changes (by seveas):

  * has_patch:  0 => 1

Comment:

 Attached are two patched: variant one implements Winston Lee's idea, which
 is nice but cannot be used to check the value before mangling the
 environment. Patch two checks whether the timezone is available in
 /usr/share/zoneinfo. This can be done before mangling the environment.
 Both patches do not work on windows, where the whole environment mangling
 is skipped anyway.

 I have no idea how to create unittests/doctests for this, as there is
 afaik no way to test settings handling in django's test framework (correct
 me if I'm wrong please, pointers to existing tests would be helpful too).
 I have tested both variants manually. The timezones 'UTC' and
 'America/Chicago' are seen as valid, whereas 'America/Chicagoops' was
 rejected.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3415#comment:12>
Django <http://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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to