From: Daniel Sabogal Date: Mon, 11 Jun 2018 17:15:15 +0000 (-0400) Subject: strftime: fix underlying format string in %z format X-Git-Tag: v1.1.20~57 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=da5851e9f464f74533cc8270c932cf6466ff3256;p=oweals%2Fmusl.git strftime: fix underlying format string in %z format the expression (tm->__tm_gmtoff)/3600 has type long. use %+.2ld instead. --- diff --git a/src/time/strftime.c b/src/time/strftime.c index 708875ee..0a256970 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c @@ -181,7 +181,7 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm * *l = 0; return ""; } - *l = snprintf(*s, sizeof *s, "%+.2d%.2d", + *l = snprintf(*s, sizeof *s, "%+.2ld%.2d", (tm->__tm_gmtoff)/3600, abs(tm->__tm_gmtoff%3600)/60); return *s;