1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/json/test_json_addition.rb (test_utc_datetime): fixed

timezone offsets.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-05-02 09:12:07 +00:00
parent 24bc7af43a
commit eee581f943

View file

@ -154,9 +154,9 @@ class TC_JSONAddition < Test::Unit::TestCase
assert_equal d, JSON.parse(d.to_json)
d = DateTime.parse(now.utc.to_s) # of = 0
assert_equal d, JSON.parse(d.to_json)
d = DateTime.civil(2008, 6, 17, 11, 48, 32, 1) # of = 1 / 12 => 1/12
d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(1,24))
assert_equal d, JSON.parse(d.to_json)
d = DateTime.civil(2008, 6, 17, 11, 48, 32, 12) # of = 12 / 12 => 12
d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(12,24))
assert_equal d, JSON.parse(d.to_json)
end
end