summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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