ruby-changes:63780
From: Nobuyoshi <ko1@a...>
Date: Sat, 28 Nov 2020 15:41:58 +0900 (JST)
Subject: [ruby-changes:63780] 95bef7b69a (master): Subsecond of Time::tm should be 0
https://git.ruby-lang.org/ruby.git/commit/?id=95bef7b69a From 95bef7b69a6fb42687a6200b338060be307259f5 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 27 Nov 2020 16:13:42 +0900 Subject: Subsecond of Time::tm should be 0 diff --git a/time.c b/time.c index ff236ce..ae9fdc7 100644 --- a/time.c +++ b/time.c @@ -5498,6 +5498,7 @@ tm_from_time(VALUE klass, VALUE time) https://github.com/ruby/ruby/blob/trunk/time.c#L5498 ttm = DATA_PTR(tm); v = &vtm; GMTIMEW(ttm->timew = tobj->timew, v); + ttm->timew = wsub(ttm->timew, v->subsecx); v->subsecx = INT2FIX(0); v->zone = Qnil; ttm->vtm = *v; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/