1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Subsecond of Time::tm should be 0

This commit is contained in:
Nobuyoshi Nakada 2020-11-27 16:13:42 +09:00
parent 276f6a225d
commit 95bef7b69a
Notes: git 2020-11-28 15:42:06 +09:00

1
time.c
View file

@ -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;