mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
fix strftime %y for negative tm_year
This commit is contained in:
parent
8d7a3f40c8
commit
583ea83541
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue