Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct wrong datetime format for git #7689

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Correct wrong datetime format for git
  • Loading branch information
zeripath committed Jul 31, 2019
commit 55accee56f2b75762140ca5053fb6fc6cd8b9568
2 changes: 1 addition & 1 deletion modules/git/repo_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,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(),
Expand Down
2 changes: 1 addition & 1 deletion modules/repofiles/temp_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down