From a5a87e37c7ee522b36b1d43dc78a0f7a50d41efc Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 7 Jul 2010 11:07:56 -0700 Subject: merging from ruby --- test/psych/visitors/test_to_ruby.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/psych/visitors/test_to_ruby.rb b/test/psych/visitors/test_to_ruby.rb index 1a4d319..b5b8e14 100644 --- a/test/psych/visitors/test_to_ruby.rb +++ b/test/psych/visitors/test_to_ruby.rb @@ -112,8 +112,10 @@ 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] + zone = now.strftime('%z') + zone = " #{zone[0,3]}:#{zone[3,5]}" + + formatted = now.strftime("%Y-%m-%d %H:%M:%S.%9N") + zone assert_equal now, Nodes::Scalar.new(formatted).to_ruby end -- cgit v1.2.3