diff options
Diffstat (limited to 'src/time')
-rw-r--r-- | src/time/strftime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time/strftime.c b/src/time/strftime.c index e103e02b..a3039204 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c @@ -166,8 +166,8 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm * item = T_FMT; goto nl_strftime; case 'y': - val = tm->tm_year % 100; - if (val<0) val += 100; + val = (tm->tm_year + 1900LL) % 100; + if (val < 0) val = -val; goto number; case 'Y': val = tm->tm_year + 1900LL; |