Django

Code

Changeset 4487

Show
Ignore:
Timestamp:
02/11/07 18:10:09 (2 years ago)
Author:
mtredinnick
Message:

Fixed #2315 -- added work around for Windows timezone setting (i.e. we can't do
it). This will work until somebody wants to write some full Win32 timezone changing code for us. Thanks to Marc Fargas and SmileyChris? for the combined patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/AUTHORS

    r4482 r4487  
    8080    Clint Ecker 
    8181    Enrico <rico.bl@gmail.com> 
     82    Marc Fargas <telenieko@telenieko.com> 
    8283    favo@exoweb.net 
    8384    Eric Floehr <eric@intellovations.com> 
  • django/trunk/django/conf/__init__.py

    r3951 r4487  
    88 
    99import os 
     10import time     # Needed for Windows 
    1011from django.conf import global_settings 
    1112 
     
    106107        self.INSTALLED_APPS = new_installed_apps 
    107108 
    108         # move the time zone info into os.environ 
    109         os.environ['TZ'] = self.TIME_ZONE 
     109        if hasattr(time, 'tzset'): 
     110            # Move the time zone info into os.environ. See ticket #2315 for why 
     111            # we don't do this unconditionally (breaks Windows). 
     112            os.environ['TZ'] = self.TIME_ZONE 
    110113 
    111114    def get_all_members(self): 
  • django/trunk/django/conf/project_template/settings.py

    r4265 r4487  
    1919# Local time zone for this installation. All choices can be found here: 
    2020# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE 
     21# If running in a Windows environment this must be set to the same as your 
     22# system time zone. 
    2123TIME_ZONE = 'America/Chicago' 
    2224 
  • django/trunk/docs/settings.txt

    r4420 r4487  
    828828running in the correct environment. 
    829829 
     830.. note:: 
     831    Django cannot reliably use alternate time zones in a Windows environment. 
     832    When running Django on Windows this variable must be set to match the 
     833    system timezone. 
     834 
    830835URL_VALIDATOR_USER_AGENT 
    831836------------------------