diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-08 16:51:28 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-08 16:51:28 +0000 |
commit | 4eec1b31b90f89101a482600770df1faae041a13 (patch) | |
tree | dd1596a3bcd0b5084d4f5636572c653accbaf768 /ext/psych | |
parent | a5dec230451cfbfa5df77c2d9f7e8dc5d8c568e4 (diff) | |
download | ruby-4eec1b31b90f89101a482600770df1faae041a13.tar.gz |
* 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
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/lib/psych/visitors/yaml_tree.rb | 7 |
1 files 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 |