From 5ab0496a9b066e7c9832b0c8ea3c3dca07d05c62 Mon Sep 17 00:00:00 2001 From: Emil Mikulic Date: Wed, 13 Dec 2006 13:01:41 +0000 Subject: [PATCH] Call tzset() during initialization. truss output suggests this isn't enough to load posixrules (UTC leap seconds data) which happens only after the first request. =( --- trunk/darkhttpd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/trunk/darkhttpd.c b/trunk/darkhttpd.c index ea1ce57..beaa41d 100644 --- a/trunk/darkhttpd.c +++ b/trunk/darkhttpd.c @@ -2519,6 +2519,7 @@ main(int argc, char **argv) sort_mime_map(); xasprintf(&keep_alive_field, "Keep-Alive: timeout=%d\r\n", idletime); init_sockin(); + tzset(); /* load TZ data; good idea to do this _before_ chroot */ /* open logfile */ if (logfile_name != NULL)