Skip to content

Commit

Permalink
[FIXED JENKINS-21906] author|committerTime now uses iso date format
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeloof committed Feb 26, 2014
1 parent 46e3904 commit 03d36a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/hudson/plugins/git/GitChangeSet.java
Expand Up @@ -14,6 +14,7 @@

import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
Expand Down Expand Up @@ -191,7 +192,11 @@ public String getDate() {

@Override
public long getTimestamp() {
return Long.parseLong(authorOrCommitter ? authorTime : committerTime) * 1000L;
try {
return new SimpleDateFormat(ISO_8601).parse(getDate()).getTime();
} catch (ParseException e) {
return -1;
}
}

@Override
Expand Down

0 comments on commit 03d36a8

Please sign in to comment.