From b0c3f438f349aabce828a63d39040a45617b5a8f Mon Sep 17 00:00:00 2001 From: Ilya Kiselev Date: Sat, 30 May 2026 00:12:57 +0300 Subject: [PATCH] test(package): clarify comment on Time.Equal usage in tar modtime check Signed-off-by: Ilya Kiselev --- pkg/action/package_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/action/package_test.go b/pkg/action/package_test.go index fea13d441..ccc73ab91 100644 --- a/pkg/action/package_test.go +++ b/pkg/action/package_test.go @@ -197,8 +197,9 @@ func TestRunWithSourceDateEpoch(t *testing.T) { require.True(t, gr.ModTime.IsZero(), "gzip header ModTime should be zero") defer gr.Close() - // All tar entry ModTimes must represent the same instant as epoch. - // tar.Reader returns ModTime in local timezone, so use Equal() not require.Equal. + // Use Equal() rather than require.Equal so that timezone differences between + // the stored epoch (UTC) and the value tar.Reader reconstructs do not cause + // a false failure on non-UTC machines. tr := tar.NewReader(gr) for { hdr, err := tr.Next()