Ticket #7062: patch_tz.diff
File patch_tz.diff, 908 bytes (added by , 17 years ago) |
---|
-
core/handlers/modpython.py
1 1 import os 2 import time 2 3 from pprint import pformat 3 4 4 5 from django import http … … 148 149 # that use settings now can work 149 150 from django.conf import settings 150 151 152 # Ensure the TZ environment variable is set appropriately for every request 153 if hasattr(time, 'tzset'): 154 # Move the time zone info into os.environ. See ticket #2315 for why 155 # we don't do this unconditionally (breaks Windows). 156 os.environ['TZ'] = self.TIME_ZONE 157 time.tzset() 158 151 159 # if we need to set up middleware, now that settings works we can do it now. 152 160 if self._request_middleware is None: 153 161 self.load_middleware()