diff --git a/pkg/cmd/helpers_test.go b/pkg/cmd/helpers_test.go index e4b344a1e..eff8c49d6 100644 --- a/pkg/cmd/helpers_test.go +++ b/pkg/cmd/helpers_test.go @@ -50,6 +50,10 @@ func init() { func runTestCmd(t *testing.T, tests []cmdTestCase) { t.Helper() t.Setenv("TZ", "UTC") + prevLocal := time.Local + t.Cleanup(func() { + time.Local = prevLocal + }) time.Local = time.UTC for _, tt := range tests { for i := 0; i <= tt.repeat; i++ {