diff options
| author | Christopher Long <indirecthit@gmail.com> | 2007-06-17 22:18:54 +0000 |
|---|---|---|
| committer | Christopher Long <indirecthit@gmail.com> | 2007-06-17 22:18:54 +0000 |
| commit | ae22b6d403dcf25098c77f0dfcf59ae58b186461 (patch) | |
| tree | c37fc631e99a7e4d909d6b6d236f495003731ea7 /django/conf/__init__.py | |
| parent | 0cf7bc439129c66df8d64601e885f83b256b4f25 (diff) | |
per-object-permissions: Merged to trunk [5486] NOTE: Not fully tested, will be working on this over the next few weeks.
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@5488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/conf/__init__.py')
| -rw-r--r-- | django/conf/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/django/conf/__init__.py b/django/conf/__init__.py index daf5ad766a..021ecc8131 100644 --- a/django/conf/__init__.py +++ b/django/conf/__init__.py @@ -7,6 +7,7 @@ a list of all possible variables. """ import os +import time # Needed for Windows from django.conf import global_settings ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE" @@ -105,8 +106,10 @@ class Settings(object): new_installed_apps.append(app) self.INSTALLED_APPS = new_installed_apps - # move the time zone info into os.environ - os.environ['TZ'] = self.TIME_ZONE + if hasattr(time, 'tzset'): + # Move the time zone info into os.environ. See ticket #2315 for why + # we don't do this unconditionally (breaks Windows). + os.environ['TZ'] = self.TIME_ZONE def get_all_members(self): return dir(self) |
