diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_time_tz.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb index c3c272dca3..46bbc8433b 100644 --- a/test/ruby/test_time_tz.rb +++ b/test/ruby/test_time_tz.rb @@ -536,4 +536,10 @@ class TestTimeTZ::WithTZ < Test::Unit::TestCase t = Time.new(2018, 9, 1, 12, 0, 0, tz) assert_equal("+0900 #{abbr}", t.strftime("%z %Z")) end + + def test_plus_with_timezone + t = Time.new(2018, 9, 1, 12, 0, 0, tz) + 4000 + assert_equal([2018, 9, 1, 13, 6, 40, tz], [t.year, t.mon, t.mday, t.hour, t.min, t.sec, t.zone]) + assert_equal(Time.utc(2018, 9, 1, 4, 6, 40), t) + end end |