Ticket #3415: t3415-variant2-check-zoneinfo.diff
File t3415-variant2-check-zoneinfo.diff, 836 bytes (added by , 15 years ago) |
---|
-
django/conf/__init__.py
103 103 self.INSTALLED_APPS = new_installed_apps 104 104 105 105 if hasattr(time, 'tzset'): 106 # Check whether the timezone is valid (Bug #3415) 107 zoneinfo_root = '/usr/share/zoneinfo' 108 if os.path.exists(zoneinfo_root) and not \ 109 os.path.exists(os.path.join(zoneinfo_root, *(self.TIME_ZONE.split('/')))): 110 raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE) 106 111 # Move the time zone info into os.environ. See ticket #2315 for why 107 112 # we don't do this unconditionally (breaks Windows). 108 113 os.environ['TZ'] = self.TIME_ZONE