From 23cd780b3dc51f1d55398748214a2c3bdce29c88 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows)" <rob@synchro.net>
Date: Wed, 13 Sep 2023 18:54:10 -0700
Subject: [PATCH] Remove redundant timestamp from "End of preexisting log
 entry" log message

Most logs sysops are looking at already have a date/timestamp for each
message, so this one ended up with 3 date/timestamps in a single line.
---
 src/sbbs3/main.cpp | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp
index 9a4ca70884..cc1072abb2 100644
--- a/src/sbbs3/main.cpp
+++ b/src/sbbs3/main.cpp
@@ -3381,7 +3381,6 @@ bool sbbs_t::init()
 {
 	char		str[MAX_PATH+1];
 	char		tmp[128];
-	char		tmp2[128];
 	int			result;
 	int			i,j,k,l;
 	node_t		node;
@@ -3502,16 +3501,10 @@ bool sbbs_t::init()
 
 		if(filelength(fileno(logfile_fp))) {
 			log(crlf);
-			now=time(NULL);
-			struct tm tm;
-			localtime_r(&now,&tm);
 			time_t ftime = fdate(str);
-			safe_snprintf(str,sizeof(str),"%s  %s %s %02d %u  "
+			safe_snprintf(str,sizeof(str),
 				"End of preexisting log entry (possible crash on %.24s)"
-				,hhmmtostr(&cfg,&tm,tmp)
-				,wday[tm.tm_wday]
-				,mon[tm.tm_mon],tm.tm_mday,tm.tm_year+1900
-				,ctime_r(&ftime, tmp2));
+				,ctime_r(&ftime, tmp));
 			logline(LOG_NOTICE,"L!",str);
 			log(crlf);
 			catsyslog(TRUE);
-- 
GitLab