aboutsummaryrefslogtreecommitdiffstats
path: root/ext/date/date_strftime.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-25 13:01:06 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-25 13:01:06 +0000
commite358888d5e22344429ee7d5589b5053e0a817afd (patch)
tree758b0a7b5588bb4633ddf31540c630d489382a7a /ext/date/date_strftime.c
parent96216554d2de68c90c53068a87d88e8f25207d74 (diff)
downloadruby-e358888d5e22344429ee7d5589b5053e0a817afd.tar.gz
* ext/date/date_core.c: should not force cast with macros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date/date_strftime.c')
-rw-r--r--ext/date/date_strftime.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/date/date_strftime.c b/ext/date/date_strftime.c
index f30f6103ca..774d8acb8b 100644
--- a/ext/date/date_strftime.c
+++ b/ext/date/date_strftime.c
@@ -487,13 +487,14 @@ date_strftime_wo_timespec(char *s, size_t maxsize, const char *format,
case 'z': /* time zone offset east of GMT e.g. -0600 */
SKIP_MODIFIER_EO;
{
- int aoff, hl, hw;
+ long aoff;
+ int hl, hw;
off = NUM2LONG(rb_funcall(vtm->utc_offset, rb_intern("round"), 0));
- aoff = (int)off;
+ aoff = off;
if (aoff < 0)
- aoff = (int)-off;
+ aoff = -off;
if ((aoff / 3600) < 10)
hl = 1;