summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-22 10:21:16 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-22 10:21:16 +0000
commited01f3c71eb32a73f062fbd8b6db01ba41d952f4 (patch)
tree9e7d098b4737200e22421bf931a75bdfa1f1e225 /test
parentbb7fa59e0f3d6c535ea2377e92156829f40362de (diff)
Revert r54694 because of compatibility problem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/date/test_date_conv.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/date/test_date_conv.rb b/test/date/test_date_conv.rb
index e7f412f2ca..daf0374294 100644
--- a/test/date/test_date_conv.rb
+++ b/test/date/test_date_conv.rb
@@ -31,10 +31,12 @@ class TestDateConv < Test::Unit::TestCase
end
def test_to_time__from_datetime
- d = DateTime.new(2004, 9, 19, 1, 2, 3, 8.to_r/24) + 456789.to_r/86400000000
+ d = DateTime.new(2004, 9, 19, 1, 2, 3, 9.to_r/24) + 456789.to_r/86400000000
t = d.to_time
- assert_equal([2004, 9, 19, 1, 2, 3, 456789, 8*60*60],
- [t.year, t.mon, t.mday, t.hour, t.min, t.sec, t.usec, t.utc_offset])
+ if t.utc_offset == 9*60*60
+ assert_equal([2004, 9, 19, 1, 2, 3, 456789],
+ [t.year, t.mon, t.mday, t.hour, t.min, t.sec, t.usec])
+ end
d = DateTime.new(2004, 9, 19, 1, 2, 3, 0) + 456789.to_r/86400000000
t = d.to_time.utc