Fix pointer incompatiblity

Since the subsecond part is discarded, WIDEVAL to VALUE conversion is
needed.
This commit is contained in:
Nobuyoshi Nakada 2024-03-22 18:18:35 +09:00
parent 2c4170ea21
commit 055613fd86
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

2
time.c
View File

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