Skip to content

Commit 3a8272a

Browse files
authored
Merge pull request #18 from Telefonica/fix-added-timestamp-truncated
Fix added timestamp truncated
2 parents 98862cf + 07d8039 commit 3a8272a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/fluent/plugin/filter_elasticsearch_timestamp_check.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def filter(tag, time, record)
6565

6666
unless record['fluent_converted_timestamp']
6767
record['@timestamp'] = record['fluent_added_timestamp'] =
68-
Time.at(time.is_a?(Fluent::EventTime) ? time.to_int : time).strftime(@strftime_format)
68+
Time.at(time.is_a?(Fluent::EventTime) ? time.to_r : time).strftime(@strftime_format)
6969
$log.debug("Timestamp added: #{record['@timestamp']}")
7070
end
7171

0 commit comments

Comments
 (0)