Browse Source

Use local timezone to compare (#10446)

master
6543 GitHub 5 years ago
parent
commit
dc88b786e9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      integrations/repo_test.go

+ 3
- 2
integrations/repo_test.go View File

@@ -68,18 +68,19 @@ func testViewRepo(t *testing.T) {
items = append(items, f) items = append(items, f)
}) })


commitT := time.Date(2017, time.June, 14, 13, 54, 21, 0, time.UTC).In(time.Local).Format(time.RFC1123)
assert.EqualValues(t, []file{ assert.EqualValues(t, []file{
{ {
fileName: "doc", fileName: "doc",
commitID: "2a47ca4b614a9f5a43abbd5ad851a54a616ffee6", commitID: "2a47ca4b614a9f5a43abbd5ad851a54a616ffee6",
commitMsg: "init project", commitMsg: "init project",
commitTime: time.Date(2017, time.June, 14, 13, 54, 21, 0, time.UTC).Format(time.RFC1123),
commitTime: commitT,
}, },
{ {
fileName: "README.md", fileName: "README.md",
commitID: "2a47ca4b614a9f5a43abbd5ad851a54a616ffee6", commitID: "2a47ca4b614a9f5a43abbd5ad851a54a616ffee6",
commitMsg: "init project", commitMsg: "init project",
commitTime: time.Date(2017, time.June, 14, 13, 54, 21, 0, time.UTC).Format(time.RFC1123),
commitTime: commitT,
}, },
}, items) }, items)
} }


Loading…
Cancel
Save