From 76f796f2ade55bafb494b6025ac729db39b1f88f Mon Sep 17 00:00:00 2001 From: Mujib Ahasan Date: Wed, 11 Mar 2026 01:12:00 +0530 Subject: [PATCH] update: helper now save previous time.local value and restore it Signed-off-by: Mujib Ahasan --- pkg/cmd/helpers_test.go | 4 ++++ 1 file changed, 4 insertions(+) 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++ {