1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Removed redundant suffix _with_timezone

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-10-08 08:46:50 +00:00
parent 5d85a46e0c
commit 68ec41d7b9

View file

@ -520,24 +520,24 @@ class TestTimeTZ::WithTZ < Test::Unit::TestCase
"JST"
end
def test_new_with_timezone
def test_new
t = Time.new(2018, 9, 1, 12, 0, 0, tz)
assert_equal([2018, 9, 1, 12, 0, 0, tz], [t.year, t.mon, t.mday, t.hour, t.min, t.sec, t.zone])
assert_equal(Time.utc(2018, 9, 1, 3, 0, 0).to_i, t.to_i)
end
def test_getlocal_with_timezone
def test_getlocal
t = Time.utc(2018, 9, 1, 12, 0, 0).getlocal(tz)
assert_equal([2018, 9, 1, 21, 0, 0, tz], [t.year, t.mon, t.mday, t.hour, t.min, t.sec, t.zone])
assert_equal(Time.utc(2018, 9, 1, 12, 0, 0), t)
end
def test_strftime_with_timezone
def test_strftime
t = Time.new(2018, 9, 1, 12, 0, 0, tz)
assert_equal("+0900 #{abbr}", t.strftime("%z %Z"))
end
def test_plus_with_timezone
def test_plus
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)