提交 583ea835 编写于 作者: S Szabolcs Nagy 提交者: Rich Felker

fix strftime %y for negative tm_year

上级 8d7a3f40
......@@ -167,6 +167,7 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *
goto nl_strftime;
case 'y':
val = tm->tm_year % 100;
if (val<0) val += 100;
goto number;
case 'Y':
val = tm->tm_year + 1900LL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册