Skip to content

Commit a4b7a4f

Browse files
zeripathtechknowlogick
authored andcommitted
Correct wrong datetime format for git (#7689)
1 parent a9b4c81 commit a4b7a4f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/git/repo_tree.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type CommitTreeOpts struct {
6161

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

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

modules/repofiles/temp_repo.go

Lines changed: 1 addition & 1 deletion
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)