From 39da4ac6d4e66fde9affc2655c2207c61e70745f Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 31 Jul 2019 22:13:15 +0100 Subject: [PATCH] Correct wrong datetime format for git (#7689) (#7690) --- modules/git/repo_tree.go | 2 +- modules/repofiles/temp_repo.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/git/repo_tree.go b/modules/git/repo_tree.go index 7d32d3685..d601da9ad 100644 --- a/modules/git/repo_tree.go +++ b/modules/git/repo_tree.go @@ -63,7 +63,7 @@ type CommitTreeOpts struct { // CommitTree creates a commit from a given tree id for the user with provided message func (repo *Repository) CommitTree(sig *Signature, tree *Tree, opts CommitTreeOpts) (SHA1, error) { - commitTimeStr := time.Now().Format(time.UnixDate) + commitTimeStr := time.Now().Format(time.RFC3339) // Because this may call hooks we should pass in the environment env := append(os.Environ(), diff --git a/modules/repofiles/temp_repo.go b/modules/repofiles/temp_repo.go index ef75709c2..d640ba80b 100644 --- a/modules/repofiles/temp_repo.go +++ b/modules/repofiles/temp_repo.go @@ -249,7 +249,7 @@ func (t *TemporaryUploadRepository) GetLastCommitByRef(ref string) (string, erro // CommitTree creates a commit from a given tree for the user with provided message func (t *TemporaryUploadRepository) CommitTree(author, committer *models.User, treeHash string, message string) (string, error) { - commitTimeStr := time.Now().Format(time.UnixDate) + commitTimeStr := time.Now().Format(time.RFC3339) authorSig := author.NewGitSig() committerSig := committer.NewGitSig()