commitTime showing incorrect date on new year
Closed this issue · 2 comments
-
Plugin version used.
2.21 -
Jenkins version used.
2.190.1 -
Config in pipeline
def changelogContext = gitChangelog returnType: 'CONTEXT',
from: [type: 'COMMIT', value: 'commithash'],
to: [type: 'REF', value: 'HEAD'],
jira: [issuePattern: 'JIRAPATTERN-([0-9]+)\b', password: '', server: '', username: '']def tempMap
def commitArray = []
changelogContext.commits.each { commit ->
tempMap = [id: commit.hashFull, commitTime: commit.commitTime]
commitArray.add(tempMap)
}
println(JsonOutput.toJson(commits: commitArray)) -
Date shown on jenkins pipeline output
{"id":commithash,"commitTime":"2020-12-30 20:28:20"} -
Date shown when running the following command:
git log -1 --pretty=format:"%H%x09%cd%x09%s commithash
commithash Mon Dec 30 15:28:20 2019 -0500
Let me know if you need anything else to try and replicate. Thanks for your time!
Can you repeat it in an open repository?
no response, closing.