From 728d9f18348bcffedb0880c67015f08a7c19665f Mon Sep 17 00:00:00 2001 From: nagachika Date: Sun, 13 Nov 2022 11:20:01 +0900 Subject: merge revision(s) 011d4c57d21220249600dfb76db84840550da019: [Backport #19106] [Bug #19106] Normalize time at 24:00:00 with a timezone object --- test/ruby/test_time_tz.rb | 5 +++++ time.c | 24 ++++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) --- test/ruby/test_time_tz.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb index fdc9e114b5..b6785f3360 100644 --- a/test/ruby/test_time_tz.rb +++ b/test/ruby/test_time_tz.rb @@ -612,6 +612,11 @@ module TestTimeTZ::WithTZ assert_raise(ArgumentError) {time_class.new(2018, 9, 1, 12, 0, 0, tzarg, in: tzarg)} end + def subtest_hour24(time_class, tz, tzarg, tzname, abbr, utc_offset) + t = time_class.new(2000, 1, 1, 24, 0, 0, tzarg) + assert_equal([0, 0, 0, 2, 1, 2000], [t.sec, t.min, t.hour, t.mday, t.mon, t.year]) + end + def subtest_now(time_class, tz, tzarg, tzname, abbr, utc_offset) t = time_class.now(in: tzarg) assert_equal(tz, t.zone) -- cgit v1.2.3