2015-06-11 15:46:50 +02:00
|
|
|
--- a/src/libical/icaltz-util.c 2015-06-11 15:40:58.843138630 +0200
|
|
|
|
+++ b/src/libical/icaltz-util.c 2015-06-11 15:43:12.722046252 +0200
|
|
|
|
@@ -107,7 +107,7 @@
|
2015-03-27 01:29:57 +01:00
|
|
|
char charcnt[4];
|
|
|
|
} tzinfo;
|
2012-08-08 11:10:36 +02:00
|
|
|
|
|
|
|
-static char *search_paths [] = {"/usr/share/zoneinfo","/usr/lib/zoneinfo","/etc/zoneinfo","/usr/share/lib/zoneinfo"};
|
2015-06-11 15:46:50 +02:00
|
|
|
+static char *search_paths [] = {"/etc/zoneinfo","/usr/share/zoneinfo","/usr/lib/zoneinfo","/usr/share/lib/zoneinfo"};
|
2012-08-08 11:10:36 +02:00
|
|
|
static char *zdir = NULL;
|
|
|
|
|
|
|
|
#define NUM_SEARCH_PATHS (sizeof (search_paths)/ sizeof (search_paths [0]))
|
2015-06-11 15:46:50 +02:00
|
|
|
@@ -194,6 +194,15 @@
|
2012-08-08 11:10:36 +02:00
|
|
|
const char *fname = ZONES_TAB_SYSTEM_FILENAME;
|
2015-03-27 01:29:57 +01:00
|
|
|
unsigned int i;
|
2012-08-08 11:10:36 +02:00
|
|
|
|
2015-06-11 15:46:50 +02:00
|
|
|
+ const char *env_tzdir = getenv ("TZDIR");
|
2012-08-08 11:10:36 +02:00
|
|
|
+ if (env_tzdir) {
|
|
|
|
+ sprintf (file_path, "%s/%s", env_tzdir, fname);
|
|
|
|
+ if (!access (file_path, F_OK|R_OK)) {
|
|
|
|
+ zdir = env_tzdir;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
2015-03-27 01:29:57 +01:00
|
|
|
for (i = 0; i < NUM_SEARCH_PATHS; i++) {
|
2012-08-08 11:10:36 +02:00
|
|
|
sprintf (file_path, "%s/%s", search_paths [i], fname);
|
|
|
|
if (!access (file_path, F_OK|R_OK)) {
|