Skip to content

Commit

Permalink
Fix event::overwrite to copy timestamp properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hart committed Mar 11, 2014
1 parent fa27dc9 commit ef816ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/logstash/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef816ae

Please sign in to comment.