allow configuring TZ environment variable
Costa Tsaousis (ktsaou) committed
Apr 18, 2017 at 10:27 UTC
9f93c9bcf3ad84960331a91d27e26ae04af2f1f7
1 file changed
+1
-1
src/main.c
+1
-1
@@ -504,7 +504,7 @@ void set_global_environment() {
504
505
// avoid flood calls to stat(/etc/localtime)
506
// http://stackoverflow.com/questions/4554271/how-to-avoid-excessive-stat-etc-localtime-calls-in-strftime-on-linux
507
- setenv("TZ", ":/etc/localtime", 0);
507
+ setenv("TZ", config_get(CONFIG_SECTION_GLOBAL, "TZ environment variable", ":/etc/localtime"), 0);
508
509
// set the path we need
510
char path[1024 + 1], *p = getenv("PATH");