summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-11-27 16:13:42 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-11-28 15:41:41 +0900
commit95bef7b69a6fb42687a6200b338060be307259f5 (patch)
treee452b2e6cc1c9705ccf4886b317cb3ad7d0ca930
parent276f6a225d18561cbe5282b798cb4e416c66079f (diff)
downloadruby-95bef7b69a6fb42687a6200b338060be307259f5.tar.gz
Subsecond of Time::tm should be 0
-rw-r--r--time.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/time.c b/time.c
index ff236ce45b..ae9fdc7104 100644
--- a/time.c
+++ b/time.c
@@ -5498,6 +5498,7 @@ tm_from_time(VALUE klass, VALUE time)
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;