diff --git a/libbeat/common/fmtstr/formatevents_test.go b/libbeat/common/fmtstr/formatevents_test.go index 6e78eb5713f9..a644676db754 100644 --- a/libbeat/common/fmtstr/formatevents_test.go +++ b/libbeat/common/fmtstr/formatevents_test.go @@ -109,7 +109,7 @@ func TestEventFormatString(t *testing.T) { "test timestamp formatter", "%{[key]}: %{+YYYY.MM.dd}", beat.Event{ - Timestamp: time.Date(2015, 5, 1, 20, 12, 34, 0, time.Local), + Timestamp: time.Date(2015, 5, 1, 20, 12, 34, 0, time.UTC), Fields: common.MapStr{ "key": "timestamp", }, @@ -121,7 +121,7 @@ func TestEventFormatString(t *testing.T) { "test timestamp formatter", "%{[@timestamp]}: %{+YYYY.MM.dd}", beat.Event{ - Timestamp: time.Date(2015, 5, 1, 20, 12, 34, 0, time.Local), + Timestamp: time.Date(2015, 5, 1, 20, 12, 34, 0, time.UTC), Fields: common.MapStr{ "key": "timestamp", }, diff --git a/libbeat/common/fmtstr/formattimestamp_test.go b/libbeat/common/fmtstr/formattimestamp_test.go index 4df8e6b3fdc1..1a2c91decdd5 100644 --- a/libbeat/common/fmtstr/formattimestamp_test.go +++ b/libbeat/common/fmtstr/formattimestamp_test.go @@ -73,14 +73,14 @@ func TestTimestampFormatString(t *testing.T) { "test timestamp formatter", "%{[key]}: %{+YYYY.MM.dd}", common.MapStr{"key": "timestamp"}, - time.Date(2015, 5, 1, 20, 12, 34, 0, time.Local), + time.Date(2015, 5, 1, 20, 12, 34, 0, time.UTC), "timestamp: 2015.05.01", }, { "test timestamp formatter", "%{[@timestamp]}: %{+YYYY.MM.dd}", common.MapStr{"key": "timestamp"}, - time.Date(2015, 5, 1, 20, 12, 34, 0, time.Local), + time.Date(2015, 5, 1, 20, 12, 34, 0, time.UTC), "2015-05-01T20:12:34.000Z: 2015.05.01", }, }