зеркало из https://github.com/github/ruby.git
Fix pointer incompatiblity
Since the subsecond part is discarded, WIDEVAL to VALUE conversion is needed.
This commit is contained in:
Родитель
2c4170ea21
Коммит
055613fd86
2
time.c
2
time.c
|
@ -2346,7 +2346,7 @@ zone_timelocal(VALUE zone, VALUE time)
|
|||
struct time_object *tobj = RTYPEDDATA_GET_DATA(time);
|
||||
wideval_t t, s;
|
||||
|
||||
split_second(tobj->timew, &t, &s);
|
||||
wdivmod(tobj->timew, WINT2FIXWV(TIME_SCALE), &t, &s);
|
||||
tm = tm_from_time(rb_cTimeTM, time);
|
||||
utc = rb_check_funcall(zone, id_local_to_utc, 1, &tm);
|
||||
if (UNDEF_P(utc)) return 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче