mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Merge pull request #1161 from rtkmhart/master
Fix event::overwrite to copy timestamp properly
This commit is contained in:
commit
cd1f529867
1 changed files with 4 additions and 0 deletions
|
@ -175,6 +175,10 @@ class LogStash::Event
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue