1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
tenderlove 2010-07-08 16:51:28 +00:00
parent a5dec23045
commit 4eec1b31b9

View file

@ -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