From ef816ae23cac3e613fe2ee0ab69c665347cab68d Mon Sep 17 00:00:00 2001 From: Michael Hart Date: Tue, 11 Mar 2014 11:16:37 -0400 Subject: [PATCH] Fix event::overwrite to copy timestamp properly --- lib/logstash/event.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/logstash/event.rb b/lib/logstash/event.rb index f4dde9c5b86..06a146c0e62 100644 --- a/lib/logstash/event.rb +++ b/lib/logstash/event.rb @@ -175,6 +175,10 @@ def to_hash public def overwrite(event) @data = event.to_hash + #convert timestamp if it is a String + if @data["@timestamp"].is_a?(String) + @data["@timestamp"] = LogStash::Time.parse_iso8601(@data["@timestamp"]) + end end public