Correct wrong datetime format for git (#7689) (#7690)

pull/7704/head
zeripath 5 years ago committed by GitHub
parent 8f29011723
commit 39da4ac6d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/git/repo_tree.go
  2. 2
      modules/repofiles/temp_repo.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(),

@ -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()

Loading…
Cancel
Save