From e57931f56d4cc9d1986ed718e97bd89ca3bb60e1 Mon Sep 17 00:00:00 2001 From: Ryooooooga Date: Wed, 18 May 2022 20:47:27 +0900 Subject: [PATCH] test: fix timezone for time format tests --- pkg/gui/presentation/commits_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/gui/presentation/commits_test.go b/pkg/gui/presentation/commits_test.go index 2ae25e890..158396c2f 100644 --- a/pkg/gui/presentation/commits_test.go +++ b/pkg/gui/presentation/commits_test.go @@ -1,6 +1,7 @@ package presentation import ( + "os" "strings" "testing" @@ -218,12 +219,14 @@ func TestGetCommitListDisplayStrings(t *testing.T) { bisectInfo: git_commands.NewNullBisectInfo(), cherryPickedCommitShaSet: set.New[string](), expected: formatExpected(` - sha1 2022-05-13 21:00:00 Jesse Duffield commit1 - sha2 2022-05-14 21:00:00 Jesse Duffield commit2 + sha1 2022-05-13 12:00:00 Jesse Duffield commit1 + sha2 2022-05-14 12:00:00 Jesse Duffield commit2 `), }, } + os.Setenv("TZ", "UTC") + focusing := false for _, scenario := range scenarios { if scenario.focus {