Fix TestExporterAttributeLists timezone sensitivity (#9539) Normalizes `got.Events[0].Time` to `.UTC()` in `TestExporterAttributeLists` so the test does not fail on hosts running in non-UTC timezones. Tested across multiple timezones (UTC, Europe/Madrid, Asia/Tokyo, America/Los_Angeles, Asia/Kolkata) via `TZ=<zone> make test/./exporters/stdout/stdouttrace` and `make precommit`. Resolves #9538.
diff --git a/exporters/stdout/stdouttrace/nonfinite_test.go b/exporters/stdout/stdouttrace/nonfinite_test.go index a57a484..9e98028 100644 --- a/exporters/stdout/stdouttrace/nonfinite_test.go +++ b/exporters/stdout/stdouttrace/nonfinite_test.go
@@ -327,7 +327,7 @@ require.Len(t, got.Events, 1) assert.JSONEq(t, tc.want, string(got.Events[0].Attributes)) assert.Equal(t, "event", got.Events[0].Name) - assert.Equal(t, time.Unix(1, 0).UTC(), got.Events[0].Time) + assert.Equal(t, time.Unix(1, 0).UTC(), got.Events[0].Time.UTC()) assert.Equal(t, 2, got.Events[0].DroppedAttributeCount) require.Len(t, got.Links, 1) assert.JSONEq(t, tc.want, string(got.Links[0].Attributes))