summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-03-07 13:08:37 +0900
committerNobuyoshi Nakada <[email protected]>2024-03-07 13:08:37 +0900
commitd3279a0c11ca45ca85027e7eb74dc4aac52c478b (patch)
tree56d4b4348efed03807f2ea6a9b840cc7db6db40d /time.c
parente13fd48f55030cae8128efde3d49e23244b1823a (diff)
[Bug #20327] Do not count subsecond to calculate UTC offset
Assume that there will never be any time zones with UTC offsets that are subseconds. Historically, UTC offset has only been used down to the second.
Diffstat (limited to 'time.c')
-rw-r--r--time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/time.c b/time.c
index d28e0e9f6c..6179b081c0 100644
--- a/time.c
+++ b/time.c
@@ -2346,7 +2346,7 @@ zone_timelocal(VALUE zone, VALUE time)
struct time_object *tobj = RTYPEDDATA_GET_DATA(time);
wideval_t t, s;
- t = rb_time_unmagnify(tobj->timew);
+ split_second(tobj->timew, &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;