diff options
Diffstat (limited to 'ext/date/date_strftime.c')
-rw-r--r-- | ext/date/date_strftime.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/ext/date/date_strftime.c b/ext/date/date_strftime.c index 5781d3b795..02ad9a47ae 100644 --- a/ext/date/date_strftime.c +++ b/ext/date/date_strftime.c @@ -406,19 +406,11 @@ date_strftime_with_tmx(char *s, size_t maxsize, const char *format, break; case 's': - { - VALUE sec = div(tmx_timev, INT2FIX(1)); - FMTV('0', 1, "d", sec); - } + FMTV('0', 1, "d", tmx_secs); continue; case 'Q': - { - VALUE sec = div(tmx_timev, - rb_rational_new2(INT2FIX(1), - INT2FIX(1000))); - FMTV('0', 1, "d", sec); - } + FMTV('0', 1, "d", tmx_msecs); continue; case 'S': /* second, 00 - 59 */ @@ -697,7 +689,7 @@ date_strftime_with_tmx(char *s, size_t maxsize, const char *format, NEEDS(precision); { - VALUE subsec = mod(tmx_timev, INT2FIX(1)); + VALUE subsec = tmx_sec_fraction; int ww; long n; |