branch: elpa/casual
commit d0c408c36954ba3130c20c945298f58277025249
Author: Steven Allen <[email protected]>
Commit: Steven Allen <[email protected]>
casual-timezone: Obey the TZDIR environment variable
Look for the timezone database in TZDIR when set.
---
lisp/casual-timezone-utils.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lisp/casual-timezone-utils.el b/lisp/casual-timezone-utils.el
index fa2a6b9a7c..baf778e3d3 100644
--- a/lisp/casual-timezone-utils.el
+++ b/lisp/casual-timezone-utils.el
@@ -88,8 +88,13 @@ working hour in `casual-timezone-planner'."
:type 'string
:group 'casual)
-(defcustom casual-timezone-zone-info-database "/usr/share/zoneinfo/tzdata.zi"
- "Path to the tzdata.zi file used by `casual-timezone-zone-info'."
+(defcustom casual-timezone-zone-info-database
+ (file-name-concat (or (getenv "TZDIR") "/usr/share/zoneinfo")
+ "tzdata.zi")
+ "Path to the tzdata.zi file used by `casual-timezone-zone-info'.
+
+Defaults to $TZDIR/tzdata.zi when the TZDIR environment variable
+is set and /usr/share/zoneinfo/tzdata.zi otherwise."
:type 'file
:group 'casual)