From 13f5a607fb3e1269b079bb7a262addd7e718791b Mon Sep 17 00:00:00 2001 From: tenderlove Date: Tue, 6 Jul 2010 01:23:07 +0000 Subject: * 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 --- test/psych/visitors/test_to_ruby.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/psych/visitors/test_to_ruby.rb') diff --git a/test/psych/visitors/test_to_ruby.rb b/test/psych/visitors/test_to_ruby.rb index 1a4d3194f3..077b8796a5 100644 --- a/test/psych/visitors/test_to_ruby.rb +++ b/test/psych/visitors/test_to_ruby.rb @@ -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 -- cgit v1.2.3