Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: git-plugin
-
Labels:
-
Similar Issues:
Description
Using the following groovy code:
def thr = Thread.currentThread();
def currentBuild = thr?.executable;
def changes = currentBuild.getChangeSet();
changes.getItems().each {
ChangeLogSet.Entry lastChange = (ChangeLogSet.Entry)it;
lastChange.getTimestamp();
}
Produces a wrong timestamp (0).
Reverting to git plugin 2.0.1 fixes the issue.
Attachments
Issue Links
- is related to
-
JENKINS-21906 NumberFormatException occurs when accessing the JSON api
-
- Closed
-
Hi, I have checked code. the issue is in GitChangeSet:isoDateFormat method. git tool returns the time in seconds but java Date class requires milliseconds - so just multiply time by 1000
fix: