summaryrefslogtreecommitdiffstats
path: root/strftime.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-28 15:01:07 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-28 15:01:07 +0000
commit80700fd86601eeef3b11987c08e6f18da6507801 (patch)
tree3345eb2f9ffb0a84f78448829e85bc32baef8342 /strftime.c
parentb15e67584681d25ec981ba89075d46b8a811c127 (diff)
downloadruby-80700fd86601eeef3b11987c08e6f18da6507801.tar.gz
ruby-80700fd86601eeef3b11987c08e6f18da6507801.tar.xz
ruby-80700fd86601eeef3b11987c08e6f18da6507801.zip
* strftime.c (rb_strftime): Time.mktime(2000).strftime("%-S") should
return "0", not "". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'strftime.c')
-rw-r--r--strftime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strftime.c b/strftime.c
index d90e8e526..2b8033cf2 100644
--- a/strftime.c
+++ b/strftime.c
@@ -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); \