Project

General

Profile

Bug #11595 ยป time_utc.patch

nkmrya (Yasuhiro Nakamura), 11/30/2015 01:27 PM

View differences:

test/test_time.rb
assert_equal(true, Time.rfc2822("Sat, 01 Jan 2000 00:00:00 -0000").utc?)
assert_equal(false, Time.rfc2822("Sat, 01 Jan 2000 00:00:00 +0000").utc?)
assert_equal(true, Time.rfc2822("Sat, 01 Jan 2000 00:00:00 UTC").utc?)
ENV['TZ'] = 'UTC'
assert_equal(true, Time.now.utc?)
ENV['TZ'] = 'Asia/Tokyo'
assert_equal(false, Time.now.utc?)
ENV['TZ'] = nil
end
def test_rfc2822_utc_roundtrip_winter
time.c
rb_timespec_now(&ts);
tobj->timew = timespec2timew(&ts);
MAKE_TM(time, tobj);
if (rb_equal(tobj->vtm.utc_offset, INT2FIX(0))) {
tobj->gmt = 1;
}
return time;
}
    (1-1/1)