commit | 583ea83541dcc6481c7a1bd1a9b485526bad84a1 | [log] [tgz] |
---|---|---|
author | Szabolcs Nagy <nsz@port70.net> | Tue Oct 04 17:14:57 2016 +0000 |
committer | Rich Felker <dalias@aerifal.cx> | Thu Oct 06 18:41:45 2016 -0400 |
tree | 66dce9c91f03428fba706af01163e43ac86e0257 | |
parent | 8d7a3f40c8de414122eb8eb2131291782ee8ed15 [diff] |
fix strftime %y for negative tm_year
diff --git a/src/time/strftime.c b/src/time/strftime.c index f1ccc4d..e103e02 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c
@@ -167,6 +167,7 @@ goto nl_strftime; case 'y': val = tm->tm_year % 100; + if (val<0) val += 100; goto number; case 'Y': val = tm->tm_year + 1900LL;