mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -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
|
public
|
||||||
def overwrite(event)
|
def overwrite(event)
|
||||||
@data = event.to_hash
|
@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
|
end
|
||||||
|
|
||||||
public
|
public
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue