1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-01 05:19:17 +03:00
nixpkgs/pkgs/development/python-modules/django/django_4_set_zoneinfo_dir.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
734 B
Diff
Raw Normal View History

diff --git a/django/conf/__init__.py b/django/conf/__init__.py
index cb70a71791..5156f7dd73 100644
--- a/django/conf/__init__.py
+++ b/django/conf/__init__.py
@@ -227,7 +227,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)