From 979edb2515d24174fe9a3e2d6402d62172028c52 Mon Sep 17 00:00:00 2001
From: Joachim Wiberg <troglobit@gmail.com>
Date: Sat, 1 Feb 2025 20:33:19 +0100
Subject: [PATCH 03/16] Fix #95: printsys(), minor code simplification
Organization: Wires

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
 src/syslogd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/syslogd.c b/src/syslogd.c
index c07e143..f812d9e 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -1511,11 +1511,11 @@ void printsys(char *msg)
 			} else {
 				struct timeval tv;
 
-				now = time(NULL);
 				if (gettimeofday(&tv, NULL) == -1) {
 					tv.tv_sec  = time(NULL);
 					tv.tv_usec = 0;
 				}
+				now    = tv.tv_sec;
 				ustime = tv.tv_usec;
 			}
 
-- 
2.43.0

