mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* strftime.c (rb_strftime): Time.mktime(2000).strftime("%-S") should
return "0", not "". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5ef4c56784
commit
6a7481c38d
3 changed files with 9 additions and 1 deletions
|
@ -275,7 +275,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct tm *timept
|
|||
do { \
|
||||
int l; \
|
||||
if (precision <= 0) precision = (def_prec); \
|
||||
if (flags & BIT_OF(LEFT)) precision = 0; \
|
||||
if (flags & BIT_OF(LEFT)) precision = 1; \
|
||||
l = snprintf(s, endp - s, \
|
||||
((!padding || padding == (def_pad)) ? "%.*"fmt : "%*"fmt), \
|
||||
precision, val); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue