mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
Fix event::overwrite to copy timestamp properly
This commit is contained in:
parent
fa27dc9fcf
commit
ef816ae23c
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