From 9b3d8519c9e2a747cab2c46f78aea476bf56f7a6 Mon Sep 17 00:00:00 2001 From: Mujib Ahasan Date: Fri, 6 Mar 2026 01:48:52 +0530 Subject: [PATCH 1/3] helm history respect TZ now Signed-off-by: Mujib Ahasan --- pkg/cmd/history.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/history.go b/pkg/cmd/history.go index 11cb7afb5..6109484b6 100644 --- a/pkg/cmd/history.go +++ b/pkg/cmd/history.go @@ -175,7 +175,7 @@ func (r releaseHistory) WriteTable(out io.Writer) error { tbl := uitable.New() tbl.AddRow("REVISION", "UPDATED", "STATUS", "CHART", "APP VERSION", "DESCRIPTION") for _, item := range r { - tbl.AddRow(item.Revision, item.Updated.Format(time.ANSIC), item.Status, item.Chart, item.AppVersion, item.Description) + tbl.AddRow(item.Revision, item.Updated.In(time.Local).Format(time.ANSIC), item.Status, item.Chart, item.AppVersion, item.Description) } return output.EncodeTable(out, tbl) } From 13d68bf82db8b4f4ceeb4541901e8a4d885d7b49 Mon Sep 17 00:00:00 2001 From: Mujib Ahasan Date: Fri, 6 Mar 2026 02:36:28 +0530 Subject: [PATCH 2/3] test cases fixed for helm history Signed-off-by: Mujib Ahasan --- pkg/cmd/helpers_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cmd/helpers_test.go b/pkg/cmd/helpers_test.go index 08065499e..e4b344a1e 100644 --- a/pkg/cmd/helpers_test.go +++ b/pkg/cmd/helpers_test.go @@ -49,6 +49,8 @@ func init() { func runTestCmd(t *testing.T, tests []cmdTestCase) { t.Helper() + t.Setenv("TZ", "UTC") + time.Local = time.UTC for _, tt := range tests { for i := 0; i <= tt.repeat; i++ { t.Run(tt.name, func(t *testing.T) { From 76f796f2ade55bafb494b6025ac729db39b1f88f Mon Sep 17 00:00:00 2001 From: Mujib Ahasan Date: Wed, 11 Mar 2026 01:12:00 +0530 Subject: [PATCH 3/3] 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++ {