diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-28 12:05:19 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-28 12:05:19 +0000 |
commit | b361c8e3d5b2d91044700aa527503d1851ead0fe (patch) | |
tree | 14a5b1f19b1e297de7532b1dafdc30cb7149837a /test | |
parent | d59ad98f6accb33a2e15227f8d963f9041df0f56 (diff) |
time.c: added Time::TM#+ and Time::TM#-
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_time_tz.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb index 328fde48fc..97ec3d08a6 100644 --- a/test/ruby/test_time_tz.rb +++ b/test/ruby/test_time_tz.rb @@ -1,7 +1,6 @@ # frozen_string_literal: false require 'test/unit' require '-test-/time' -require 'time' class TestTimeTZ < Test::Unit::TestCase has_right_tz = true @@ -493,18 +492,12 @@ End @offset = offset end - def add_offset(t, ofs) - Time.utc(*Time.send(:apply_offset, *t.to_a[0, 6].reverse, ofs)) - rescue => e - raise e.class, sprintf("%s: %p %+d", e.message, t, ofs) - end - def local_to_utc(t) - add_offset(t, +@offset) + t - @offset end def utc_to_local(t) - add_offset(t, -@offset) + t + @offset end def abbr(t) |