Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 4a16a20

Browse files
committed
shared: always use utc timezone for strings when calculating commit ids
1 parent d4b46a6 commit 4a16a20

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/shared.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ func createCommitID(c commitEntry) string {
5555
b.WriteString(fmt.Sprintf("parent %s\n", j))
5656
}
5757
b.WriteString(fmt.Sprintf("author %s <%s> %v\n", c.AuthorName, c.AuthorEmail,
58-
c.Timestamp.Format(time.UnixDate)))
58+
c.Timestamp.UTC().Format(time.UnixDate)))
5959
if c.CommitterEmail != "" {
6060
b.WriteString(fmt.Sprintf("committer %s <%s> %v\n", c.CommitterName, c.CommitterEmail,
61-
c.Timestamp.Format(time.UnixDate)))
61+
c.Timestamp.UTC().Format(time.UnixDate)))
6262
}
6363
b.WriteString("\n" + c.Message)
6464
b.WriteByte(0)

0 commit comments

Comments
 (0)