mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 16:34:45 +07:00
Fix #139: System timezone changes does not 'take' in Finit
The tzset() function sets the global variables 'daylight', 'timezone' and 'tzname' according to the value of the TZ environment variable, or to the value of the _CS_TIMEZONE configuration string if TZ isn't set, or to UTC0 if neither is set. Signed-off-by: Andreas Egeberg <andreas.egeberg@gmail.com>
This commit is contained in:
+6
-1
@@ -29,7 +29,7 @@
|
||||
#include <sys/resource.h>
|
||||
#include <lite/lite.h>
|
||||
#include <lite/queue.h> /* BSD sys/queue.h API */
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <glob.h>
|
||||
|
||||
#include "finit.h"
|
||||
@@ -646,6 +646,11 @@ int conf_reload(void)
|
||||
size_t i;
|
||||
glob_t gl;
|
||||
|
||||
/* Set time according to current time zone */
|
||||
tzset();
|
||||
_d("Set time daylight: %d timezone: %ld tzname: %s %s",
|
||||
daylight, timezone, tzname[0], tzname[1]);
|
||||
|
||||
/* Mark and sweep */
|
||||
svc_mark_dynamic();
|
||||
tty_mark();
|
||||
|
||||
Reference in New Issue
Block a user