* 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:
parent
a5dec23045
commit
4eec1b31b9
@ -282,14 +282,11 @@ module Psych
|
|||||||
|
|
||||||
private
|
private
|
||||||
def format_time time
|
def format_time time
|
||||||
formatted = time.strftime("%Y-%m-%d %H:%M:%S.%9N")
|
|
||||||
if time.utc?
|
if time.utc?
|
||||||
formatted += "Z"
|
time.strftime("%Y-%m-%d %H:%M:%S.%9NZ")
|
||||||
else
|
else
|
||||||
zone = time.strftime('%z')
|
time.strftime("%Y-%m-%d %H:%M:%S.%9N %:z")
|
||||||
formatted += " #{zone[0,3]}:#{zone[3,5]}"
|
|
||||||
end
|
end
|
||||||
formatted
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# FIXME: remove this method once "to_yaml_properties" is removed
|
# FIXME: remove this method once "to_yaml_properties" is removed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user