From 958f373550a93532a2df9c7f5242befb29f3a6e8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 30 Oct 1998 11:18:38 +0000 Subject: [PATCH] move the time init before the logfile opening. --- log.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/log.c b/log.c index d09094c6..30aca47e 100644 --- a/log.c +++ b/log.c @@ -69,6 +69,13 @@ void log_open(void) if (initialised) return; initialised = 1; + /* this looks pointless, but it is needed in order for the + C library on some systems to fetch the timezone info + before the chroot */ + t = time(NULL); + localtime(&t); + + /* optionally use a log file instead of syslog */ logf = lp_log_file(); if (logf && *logf) { logfile = fopen(logf, "a"); @@ -88,12 +95,6 @@ void log_open(void) #ifndef LOG_NDELAY logit(LOG_INFO,"rsyncd started\n"); #endif - - /* this looks pointless, but it is needed in order for the - C library on some systems to fetch the timezone info - before the chroot */ - t = time(NULL); - localtime(&t); } -- 2.34.1