Skip to content

Commit

Permalink
Fix pointer incompatiblity
Browse files Browse the repository at this point in the history
Since the subsecond part is discarded, WIDEVAL to VALUE conversion is
needed.
  • Loading branch information
nobu committed Mar 22, 2024
1 parent 2c4170e commit 055613f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion time.c
Expand Up @@ -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;
Expand Down

0 comments on commit 055613f

Please sign in to comment.