summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/visitors/yaml_tree.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/lib/psych/visitors/yaml_tree.rb')
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb
index 93ccc5832b1..4282e0bb0a3 100644
--- a/ext/psych/lib/psych/visitors/yaml_tree.rb
+++ b/ext/psych/lib/psych/visitors/yaml_tree.rb
@@ -138,9 +138,9 @@ module Psych
def visit_Time o
formatted = o.strftime("%Y-%m-%d %H:%M:%S")
if o.utc?
- formatted += ".%06dZ" % [o.usec]
+ formatted += ".%06dZ" % [o.nsec]
else
- formatted += ".%06d %+.2d:00" % [o.usec, o.gmt_offset / 3600]
+ formatted += ".%06d %+.2d:00" % [o.nsec, o.gmt_offset / 3600]
end
@emitter.scalar formatted, nil, nil, true, false, Nodes::Scalar::ANY