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