Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/plugin_helper/test_inject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def config_inject_section(hash = {})
end

test 'injects time as formatted string in localtime if timezone not specified' do
local_timezone = Time.now.strftime('%z')
local_timezone = Time.local(2016, 6, 21, 8, 10, 11).strftime('%z')
time_in_unix = Time.parse("2016-06-21 08:10:11 #{local_timezone}").to_i
time_subsecond = 320_101_224
time = Fluent::EventTime.new(time_in_unix, time_subsecond)
Expand All @@ -245,7 +245,7 @@ def config_inject_section(hash = {})
end

test 'injects time as formatted string with nanosecond in localtime if timezone not specified' do
local_timezone = Time.now.strftime('%z')
local_timezone = Time.local(2016, 6, 21, 8, 10, 11).strftime('%z')
time_in_unix = Time.parse("2016-06-21 08:10:11 #{local_timezone}").to_i
time_subsecond = 320_101_224
time = Fluent::EventTime.new(time_in_unix, time_subsecond)
Expand All @@ -258,7 +258,7 @@ def config_inject_section(hash = {})
end

test 'injects time as formatted string with millisecond in localtime if timezone not specified' do
local_timezone = Time.now.strftime('%z')
local_timezone = Time.local(2016, 6, 21, 8, 10, 11).strftime('%z')
time_in_unix = Time.parse("2016-06-21 08:10:11 #{local_timezone}").to_i
time_subsecond = 320_101_224
time = Fluent::EventTime.new(time_in_unix, time_subsecond)
Expand Down
Loading