about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/plasma-5/plasma-desktop/tzdir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/desktops/plasma-5/plasma-desktop/tzdir.patch')
-rw-r--r--nixpkgs/pkgs/desktops/plasma-5/plasma-desktop/tzdir.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/plasma-5/plasma-desktop/tzdir.patch b/nixpkgs/pkgs/desktops/plasma-5/plasma-desktop/tzdir.patch
new file mode 100644
index 000000000000..97504b330fed
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/plasma-5/plasma-desktop/tzdir.patch
@@ -0,0 +1,18 @@
+Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
+===================================================================
+--- plasma-desktop-5.8.5.orig/kcms/dateandtime/helper.cpp
++++ plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
+@@ -181,7 +181,12 @@ int ClockHelper::tz( const QString& sele
+ 
+     val = selectedzone;
+ #else
+-    QString tz = "/usr/share/zoneinfo/" + selectedzone;
++    QString tzdir = QString::fromLocal8Bit(qgetenv("TZDIR"));
++    QString tz = tzdir + "/" + selectedzone;
++    if (tzdir.isEmpty()) {
++      // Standard Linux path
++      tz = "/usr/share/zoneinfo/" + selectedzone;
++    }
+ 
+     if (QFile::exists(tz)) { // make sure the new TZ really exists
+         QFile::remove(QStringLiteral("/etc/localtime"));