diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-10 12:43:54 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-10 12:43:54 +0000 |
commit | d06a6b22f59012399236597101dafbba7a884f70 (patch) | |
tree | 4353a899062ec417bce1cc02e84e184391b878a7 /strftime.c | |
parent | a26417fec9ced9360e3d51fd9ad21910056e22aa (diff) |
* strftime.c (rb_strftime_with_timespec): fix precision handling for
%:z and %::z.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'strftime.c')
-rw-r--r-- | strftime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/strftime.c b/strftime.c index c390d2b6e0..3bdf7f6ecf 100644 --- a/strftime.c +++ b/strftime.c @@ -451,12 +451,12 @@ rb_strftime_with_timespec(char *s, size_t maxsize, const char *format, const str break; case 1: /* %:z -> +hh:mm */ - precision = precision <= 5 ? 2 : precision-3; + precision = precision <= 6 ? 2 : precision-4; NEEDS(precision + 4); break; case 2: /* %::z -> +hh:mm:ss */ - precision = precision <= 5 ? 2 : precision-3; + precision = precision <= 9 ? 2 : precision-7; NEEDS(precision + 7); break; |