Skip to content

Commit 39da4ac

Browse files
authored
Correct wrong datetime format for git (#7689) (#7690)
1 parent 8f29011 commit 39da4ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/git/repo_tree.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type CommitTreeOpts struct {
6363

6464
// CommitTree creates a commit from a given tree id for the user with provided message
6565
func (repo *Repository) CommitTree(sig *Signature, tree *Tree, opts CommitTreeOpts) (SHA1, error) {
66-
commitTimeStr := time.Now().Format(time.UnixDate)
66+
commitTimeStr := time.Now().Format(time.RFC3339)
6767

6868
// Because this may call hooks we should pass in the environment
6969
env := append(os.Environ(),

modules/repofiles/temp_repo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func (t *TemporaryUploadRepository) GetLastCommitByRef(ref string) (string, erro
249249

250250
// CommitTree creates a commit from a given tree for the user with provided message
251251
func (t *TemporaryUploadRepository) CommitTree(author, committer *models.User, treeHash string, message string) (string, error) {
252-
commitTimeStr := time.Now().Format(time.UnixDate)
252+
commitTimeStr := time.Now().Format(time.RFC3339)
253253
authorSig := author.NewGitSig()
254254
committerSig := committer.NewGitSig()
255255

0 commit comments

Comments
 (0)