Skip to content

Commit 13b91dc

Browse files
authored
Fix timezone mismatch in instances_stats_reporter_spec (#5052)
The test used local time (Time.now) but the production code uses UTC (Time.now.utc). This caused failures when run in non-UTC timezones.
1 parent c676062 commit 13b91dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spec/unit/lib/cloud_controller/diego/reporters/instances_stats_reporter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def make_actual_lrp(instance_guid:, index:, state:, error:, since:)
4646
'process_id' => ::Diego::Bbs::Models::MetricTagValue.new(static: process.guid)
4747
}
4848
end
49-
let(:formatted_current_time) { Time.now.to_datetime.rfc3339 }
49+
let(:formatted_current_time) { Time.now.utc.to_datetime.rfc3339 }
5050

5151
let(:lrp_1_net_info) do
5252
::Diego::Bbs::Models::ActualLRPNetInfo.new(

0 commit comments

Comments
 (0)