Project

General

Profile

Bug #17024 ยป patch.diff

timcraft (Tim Craft), 07/11/2020 10:19 AM

View differences:

spec/ruby/core/time/new_spec.rb
time.zone.should == zone
time.utc_offset.should == 5*3600+30*60
time.wday.should == 6
time.yday.should == 1
end
it "accepts timezone argument that must have #local_to_utc and #utc_to_local methods" do
test/ruby/test_time_tz.rb
assert_equal([2018, 9, 1, 12, 0, 0, tz], [t.year, t.mon, t.mday, t.hour, t.min, t.sec, t.zone])
h, m = (-utc_offset / 60).divmod(60)
assert_equal(time_class.utc(2018, 9, 1, 12+h, m, 0).to_i, t.to_i)
assert_equal(6, t.wday)
assert_equal(244, t.yday)
end
def subtest_now(time_class, tz, tzarg, tzname, abbr, utc_offset)
    (1-1/1)