From 4b9a5a2384c8b99352229bddc6ee2f6e69077e5b Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 15 Oct 2009 12:18:45 +0200 Subject: [PATCH] Get timezone info before being in the chroot. Depending on the libc, first implicit call to tzset() can be done when invoking syslog() the first time. In most situation, this is done when we are in a chroot and therefore, we cannot read /etc/localtime and get an accurate timezone information. Therefore, we invoke tzset() before being in chroot. --- src/lldpd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lldpd.c b/src/lldpd.c index 14b07d2d..c95bd49b 100644 --- a/src/lldpd.c +++ b/src/lldpd.c @@ -828,6 +828,7 @@ lldpd_main(int argc, char *argv[]) } log_init(debug, __progname); + tzset(); /* Get timezone info before chroot */ if (!debug) { int pid; -- 2.39.5