mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-16 16:46:55 +01:00
fix for Jenkins integration, updates to commit f47c6b0
This commit is contained in:
@@ -105,7 +105,7 @@ public class ReportGenerator {
|
||||
velocityEngine.init();
|
||||
final EscapeTool enc = new EscapeTool();
|
||||
|
||||
final DateTime dt = DateTime.now();
|
||||
final DateTime dt = new DateTime();//.now();
|
||||
final DateTimeFormatter dateFormat = DateTimeFormat.forPattern("MMM d, yyyy 'at' HH:mm:ss z");
|
||||
final DateTimeFormatter dateFormatXML = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
|
||||
|
||||
|
||||
@@ -47,12 +47,20 @@ public class EngineVersionCheckTest extends BaseTest {
|
||||
// }
|
||||
/**
|
||||
* Converts a date in the form of yyyy-MM-dd into the epoch milliseconds.
|
||||
*
|
||||
* @param date a date in the format of yyyy-MM-dd
|
||||
* @return milliseconds
|
||||
*/
|
||||
private long dateToMilliseconds(String date) {
|
||||
DateTimeFormatter dtf = DateTimeFormat.forPattern("yyyy-MM-dd");
|
||||
return DateTime.parse(date, dtf).toInstant().getMillis();
|
||||
//removed for compatability with joda-time 1.6
|
||||
//DateTimeFormatter dtf = DateTimeFormat.forPattern("yyyy-MM-dd");
|
||||
//return DateTime.parse(date, dtf).toInstant().getMillis();
|
||||
String[] dp = date.split("-");
|
||||
int y = Integer.parseInt(dp[0]);
|
||||
int m = Integer.parseInt(dp[1]);
|
||||
int d = Integer.parseInt(dp[2]);
|
||||
DateTime dt = new DateTime(y, m, d, 0, 0, 0, 0);
|
||||
return dt.toInstant().getMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user