python312Packages.dash-renderer: remove (#369714)
[NixPkgs.git] / pkgs / development / python-modules / django / django_5_set_zoneinfo_dir.patch
blob166cc56281cf1df28dc22f9700c10239d8b1f1b2
1 diff --git a/django/conf/__init__.py b/django/conf/__init__.py
2 index 22f1eab..3a752d1 100644
3 --- a/django/conf/__init__.py
4 +++ b/django/conf/__init__.py
5 @@ -208,7 +208,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)