projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d7a3f4
)
fix strftime %y for negative tm_year
author
Szabolcs Nagy
<nsz@port70.net>
Tue, 4 Oct 2016 17:14:57 +0000
(17:14 +0000)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 6 Oct 2016 22:41:45 +0000
(18:41 -0400)
src/time/strftime.c
patch
|
blob
|
history
diff --git
a/src/time/strftime.c
b/src/time/strftime.c
index f1ccc4dd5e848c734767f34f206daf9b173675df..e103e02b72044054f13bcbae7a16e5cb5e2781b1 100644
(file)
--- a/
src/time/strftime.c
+++ b/
src/time/strftime.c
@@
-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;