From 2e8cc206f520ec9feb42273703d7afbcb32cd791 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 21 Mar 2023 14:06:27 -0700 Subject: Avoid backwards clock in movemail timestamps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lib-src/movemail.c (mbx_delimit_begin): Use ‘current_timespec’ instead of ‘time’ to generate the user-visible timestamp. This works around the minor glitch caused by glibc bug 30200 . --- lib-src/movemail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 8119046a916..972ab7156fa 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -846,7 +846,7 @@ movemail_strftime (char *s, size_t size, char const *format, static bool mbx_delimit_begin (FILE *mbf) { - time_t now = time (NULL); + time_t now = current_timespec ().tv_sec; struct tm *ltime = localtime (&now); if (!ltime) return false; -- cgit v1.2.3