-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Milestone
Description
This test from MRI 2.2 fails on our DateTime.strptime implementation:
def test_sz
d = DateTime.strptime('0 -0200', '%s %z')
assert_equal([1969, 12, 31, 22, 0, 0], [d.year, d.mon, d.mday, d.hour, d.min, d.sec])
assert_equal(Rational(-2, 24), d.offset)
d = DateTime.strptime('9 +0200', '%s %z')
assert_equal([1970, 1, 1, 2, 0, 9], [d.year, d.mon, d.mday, d.hour, d.min, d.sec])
assert_equal(Rational(2, 24), d.offset)
d = DateTime.strptime('0 -0200', '%Q %z')
assert_equal([1969, 12, 31, 22, 0, 0], [d.year, d.mon, d.mday, d.hour, d.min, d.sec])
assert_equal(Rational(-2, 24), d.offset)
d = DateTime.strptime('9000 +0200', '%Q %z')
assert_equal([1970, 1, 1, 2, 0, 9], [d.year, d.mon, d.mday, d.hour, d.min, d.sec])
assert_equal(Rational(2, 24), d.offset)
end
Failure:
TestDateStrptime#test_sz [/Users/headius/projects/jruby/test/mri/date/test_date_strptime.rb:497]:
<[1969, 12, 31, 22, 0, 0]> expected but was
<[1970, 1, 1, 0, 0, 0]>.
Can run using `jruby test/mri/runner.rb date/test_date_strptime.rb
I will exclude this test for now.