Skip to content

Commit 07d8039

Browse files
committed
Fix added timestamp truncated
1 parent 98862cf commit 07d8039

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)