lib/logstash/plugin_mixins/jdbc.rb in logstash-input-jdbc-4.0.2 vs lib/logstash/plugin_mixins/jdbc.rb in logstash-input-jdbc-4.1.0
- old
+ new
@@ -261,18 +261,17 @@
Hash[row.map { |k, v| [k.to_s, decorate_value(v)] }]
end
private
def decorate_value(value)
-
if value.is_a?(Time)
# transform it to LogStash::Timestamp as required by LS
LogStash::Timestamp.new(value)
elsif value.is_a?(DateTime)
# Manual timezone conversion detected.
# This is slower, so we put it in as a conditional case.
LogStash::Timestamp.new(Time.parse(value.to_s))
else
- value # no-op
+ value
end
end
end