Ticket #2315: windows_timezone_fix.patch
File windows_timezone_fix.patch, 1.0 KB (added by , 18 years ago) |
---|
-
django/conf/__init__.py
8 8 9 9 import os 10 10 from django.conf import global_settings 11 import time 11 12 12 13 ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE" 13 14 … … 105 106 new_installed_apps.append(app) 106 107 self.INSTALLED_APPS = new_installed_apps 107 108 108 # move the time zone info into os.environ 109 os.environ['TZ'] = self.TIME_ZONE 109 # If time doesn't have tzset (Windows environment), changing the local 110 # timezone doesn't work. In fact, in the development server this causes 111 # the timezone in Python to be set to UTC no matter what self.TIME_ZONE 112 # is. So for now, the TIME_ZONE setting is ignored in Windows. 113 if hasattr(time, 'tzset'): 114 # move the time zone info into os.environ 115 os.environ['TZ'] = self.TIME_ZONE 110 116 111 117 def get_all_members(self): 112 118 return dir(self)