diff options
| author | Paul Eggert | 2023-03-21 14:06:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2023-03-21 14:42:17 -0700 |
| commit | 2e8cc206f520ec9feb42273703d7afbcb32cd791 (patch) | |
| tree | 6d9e3af22436c6033542ed6f4fb3ea902492b3e6 /lib-src | |
| parent | 4a5ff4d9c6a7d28f18cee7276a3c6febbee0c93e (diff) | |
| download | emacs-2e8cc206f520ec9feb42273703d7afbcb32cd791.tar.gz emacs-2e8cc206f520ec9feb42273703d7afbcb32cd791.zip | |
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.c | 2 |
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, | |||
| 846 | static bool | 846 | static bool |
| 847 | mbx_delimit_begin (FILE *mbf) | 847 | mbx_delimit_begin (FILE *mbf) |
| 848 | { | 848 | { |
| 849 | time_t now = time (NULL); | 849 | time_t now = current_timespec ().tv_sec; |
| 850 | struct tm *ltime = localtime (&now); | 850 | struct tm *ltime = localtime (&now); |
| 851 | if (!ltime) | 851 | if (!ltime) |
| 852 | return false; | 852 | return false; |