method
format_time
v1_9_3_125 -
Show latest stable
- Class:
Psych::Visitors::YAMLTree
format_time(time)private
No documentation available.
# File ext/psych/lib/psych/visitors/yaml_tree.rb, line 316
def format_time time
formatted = time.strftime("%Y-%m-%d %H:%M:%S.%9N")
if time.utc?
formatted += " Z"
else
zone = time.strftime('%z')
formatted += " #{zone[0,3]}:#{zone[3,5]}"
end
formatted
end