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

* test/psych/visitors/test_to_ruby.rb (test_time): time test must

respect non-whole timezone. Thanks akr! [ruby-core:31061]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2010-07-06 01:23:07 +00:00
parent bb7b62af8d
commit 13f5a607fb

View file

@ -113,7 +113,9 @@ description:
def test_time
now = Time.now
formatted = now.strftime("%Y-%m-%d %H:%M:%S") +
".%09d %+.2d:00" % [now.nsec, now.gmt_offset / 3600]
".%09d %+.2d:%2d" % [ now.nsec,
now.gmt_offset / 3600,
now.gmt_offset % 3600 / 60]
assert_equal now, Nodes::Scalar.new(formatted).to_ruby
end