summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-03-21 14:06:27 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2023-03-21 14:42:17 -0700
commit2e8cc206f520ec9feb42273703d7afbcb32cd791 (patch)
tree6d9e3af22436c6033542ed6f4fb3ea902492b3e6 /lib-src
parent4a5ff4d9c6a7d28f18cee7276a3c6febbee0c93e (diff)
downloademacs-2e8cc206f520ec9feb42273703d7afbcb32cd791.tar.gz
Avoid backwards clock in movemail timestamps
* 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 <https://sourceware.org/bugzilla/show_bug.cgi?id=30200>.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/movemail.c2
1 files changed, 1 insertions, 1 deletions
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;