ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / django / django_3_set_zoneinfo_dir.patch
blob69ad1c85d80c52bcc70f28a9a6e9cf5e610b684e
1 diff --git a/django/conf/__init__.py b/django/conf/__init__.py
2 index 28302440c7..278cfa5e62 100644
3 --- a/django/conf/__init__.py
4 +++ b/django/conf/__init__.py
5 @@ -200,7 +200,7 @@ class Settings:
6 if hasattr(time, 'tzset') and self.TIME_ZONE:
7 # When we can, attempt to validate the timezone. If we can't find
8 # this file, no check happens and it's harmless.
9 - zoneinfo_root = Path('/usr/share/zoneinfo')
10 + zoneinfo_root = Path('@zoneinfo@')
11 zone_info_file = zoneinfo_root.joinpath(*self.TIME_ZONE.split('/'))
12 if zoneinfo_root.exists() and not zone_info_file.exists():
13 raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)