From 4eec1b31b90f89101a482600770df1faae041a13 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Thu, 8 Jul 2010 16:51:28 +0000 Subject: [PATCH] * ext/psych/lib/psych/visitors/yaml_tree.rb (format_time): use new timezone format options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/psych/lib/psych/visitors/yaml_tree.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb index 620b520a75..520cd7e9c2 100644 --- a/ext/psych/lib/psych/visitors/yaml_tree.rb +++ b/ext/psych/lib/psych/visitors/yaml_tree.rb @@ -282,14 +282,11 @@ module Psych private def format_time time - formatted = time.strftime("%Y-%m-%d %H:%M:%S.%9N") if time.utc? - formatted += "Z" + time.strftime("%Y-%m-%d %H:%M:%S.%9NZ") else - zone = time.strftime('%z') - formatted += " #{zone[0,3]}:#{zone[3,5]}" + time.strftime("%Y-%m-%d %H:%M:%S.%9N %:z") end - formatted end # FIXME: remove this method once "to_yaml_properties" is removed