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:
190bbb9
)
fix strftime regression in %e format
author
Rich Felker
<dalias@aerifal.cx>
Sat, 24 Aug 2013 18:35:17 +0000
(14:35 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 24 Aug 2013 18:35:17 +0000
(14:35 -0400)
%e pads with spaces instead of zeros.
src/time/strftime.c
patch
|
blob
|
history
diff --git
a/src/time/strftime.c
b/src/time/strftime.c
index 48f6532085ee4b4c6e376edf3d6ad26de565543f..4039d744ca981940be921961bf7d8569d82335bc 100644
(file)
--- a/
src/time/strftime.c
+++ b/
src/time/strftime.c
@@
-80,8
+80,8
@@
const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *
fmt = "%m/%d/%y";
goto recu_strftime;
case 'e':
-
val = tm->tm_mday
;
-
goto number
;
+
*l = snprintf(*s, sizeof *s, "%2d", tm->tm_mday)
;
+
return *s
;
case 'F':
fmt = "%Y-%m-%d";
goto recu_strftime;