summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-07 13:23:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-07 15:56:12 +0900
commit011d4c57d21220249600dfb76db84840550da019 (patch)
tree7f36b5404889bfe6acd124d1af3c17fb31f88252 /test
parentee86b57ee5df34390ba1d20343593adf8331c010 (diff)
[Bug #19106] Normalize time at 24:00:00 with a timezone object
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_time_tz.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb
index 6ae12dea5d..6fdb95bafe 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)