summaryrefslogtreecommitdiff
path: root/test/psych/visitors/test_to_ruby.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-06 01:23:07 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-06 01:23:07 +0000
commit13f5a607fb3e1269b079bb7a262addd7e718791b (patch)
tree4ee17c51796468f18f6517dc4e1fc6631416282d /test/psych/visitors/test_to_ruby.rb
parentbb7b62af8ddff241b3ebfbd045f75da61d1de441 (diff)
* 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
Diffstat (limited to 'test/psych/visitors/test_to_ruby.rb')
-rw-r--r--test/psych/visitors/test_to_ruby.rb4
1 files changed, 3 insertions, 1 deletions
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