Skip to content

Commit

Permalink
Merge pull request elastic#1161 from rtkmhart/master
Browse files Browse the repository at this point in the history
Fix event::overwrite to copy timestamp properly
  • Loading branch information
jordansissel committed Mar 11, 2014
2 parents fa27dc9 + 2435c63 commit cd1f529
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 cd1f529

Please sign in to comment.