提交 da5851e9 编写于 作者: D Daniel Sabogal 提交者: Rich Felker

strftime: fix underlying format string in %z format

the expression (tm->__tm_gmtoff)/3600 has type long. use %+.2ld instead.
上级 63e2e40e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册