From 8bc82b3b61b2c1a9e874a6082e8f291c3a9e574a Mon Sep 17 00:00:00 2001
From: Josef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Date: Wed, 8 Apr 2020 09:39:20 -0400
Subject: [PATCH] lib-sieve: Include year in log file header

Even on a well configured system, the log may accumulate the occasion error.
Because of the rare nature, it is impossible to know if the error from
yesterday is really a year old error that doesn't matter anymore.
---
 src/lib-sieve/sieve-error.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib-sieve/sieve-error.c b/src/lib-sieve/sieve-error.c
index 6f6669bb1..aae13a5ea 100644
--- a/src/lib-sieve/sieve-error.c
+++ b/src/lib-sieve/sieve-error.c
@@ -998,7 +998,7 @@ static void sieve_logfile_start(struct sieve_logfile_ehandler *ehandler)
 		now = time(NULL);
 		tm = localtime(&now);
 
-		if (strftime(buf, sizeof(buf), "%b %d %H:%M:%S", tm) > 0) {
+		if (strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %z", tm) > 0) {
 			sieve_logfile_printf(ehandler, __FILE__, __LINE__,
 					     "sieve", "started log at %s", buf);
 		}
-- 
GitLab