mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
a26417fec9
commit
d06a6b22f5
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Jul 10 21:43:11 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* strftime.c (rb_strftime_with_timespec): fix precision handling for
|
||||
%:z and %::z.
|
||||
|
||||
Fri Jul 9 22:32:54 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* strftime.c: unused declarations removed.
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue