[PATCH v3 7/7] misc: Use gmtime instead of localtime
Andreas Schwab
schwab@linux-m68k.org
Mon Mar 21 11:25:29 GMT 2022
On Mär 18 2022, Adhemerval Zanella via Libc-alpha wrote:
> diff --git a/misc/syslog.c b/misc/syslog.c
> index 7852441615..997e423228 100644
> --- a/misc/syslog.c
> +++ b/misc/syslog.c
> @@ -161,11 +161,25 @@ __vsyslog_internal(int pri, const char *fmt, va_list ap,
>
> /* "%h %e %H:%M:%S " */
> char timestamp[timestamp_size];
> - time_t now = time_now ();
> + __time64_t now = time64_now ();
> +
> + /* We deviate from RFC3164 which states timestamp should be in localtime
> + because although our __localtime_r does not set tzname, the relay still
> + might still use localtime (which does) and if the server timezone changes
s/still...still/still/
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
More information about the Libc-alpha
mailing list