mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02: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:
parent
a5dec23045
commit
4eec1b31b9
1 changed files with 2 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue