* strftime.c (rb_strftime_with_timespec): add an interim digit for

the timezone offset which is less than an hour.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-04-18 01:23:00 +00:00
parent 9e56e14f50
commit 442fefc78a
2 changed files with 7 additions and 2 deletions

View file

@ -493,9 +493,9 @@ rb_strftime_with_timespec(char *s, size_t maxsize, const char *format, rb_encodi
sign = +1;
}
i = snprintf(s, endp - s, (padding == ' ' ? "%+*ld" : "%+.*ld"),
precision + 1, sign * (off / 3600));
precision + 2, sign * (off / 360 + 1));
if (i < 0) goto err;
s += i;
s += i - 1;
off = off % 3600;
if (1 <= colons)
*s++ = ':';