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:
parent
a5dec23045
commit
4eec1b31b9
1 changed files with 2 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue