Skip to content

Commit 21f2cb7

Browse files
committed
Use local timezone to compare
1 parent 6baa07d commit 21f2cb7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

integrations/repo_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,19 @@ func testViewRepo(t *testing.T) {
6868
items = append(items, f)
6969
})
7070

71+
commitT := time.Date(2017, time.June, 14, 13, 54, 21, 0, time.UTC).In(time.Local).Format(time.RFC1123)
7172
assert.EqualValues(t, []file{
7273
{
7374
fileName: "doc",
7475
commitID: "2a47ca4b614a9f5a43abbd5ad851a54a616ffee6",
7576
commitMsg: "init project",
76-
commitTime: time.Date(2017, time.June, 14, 13, 54, 21, 0, time.UTC).Format(time.RFC1123),
77+
commitTime: commitT,
7778
},
7879
{
7980
fileName: "README.md",
8081
commitID: "2a47ca4b614a9f5a43abbd5ad851a54a616ffee6",
8182
commitMsg: "init project",
82-
commitTime: time.Date(2017, time.June, 14, 13, 54, 21, 0, time.UTC).Format(time.RFC1123),
83+
commitTime: commitT,
8384
},
8485
}, items)
8586
}

0 commit comments

Comments
 (0)