diff --git a/core/src/main/java/org/owasp/dependencycheck/data/update/NvdApiDataSource.java b/core/src/main/java/org/owasp/dependencycheck/data/update/NvdApiDataSource.java index 1e1b62c42ef..78f7fc56c00 100644 --- a/core/src/main/java/org/owasp/dependencycheck/data/update/NvdApiDataSource.java +++ b/core/src/main/java/org/owasp/dependencycheck/data/update/NvdApiDataSource.java @@ -306,7 +306,9 @@ private boolean processApi() throws UpdateException { builder.withEndpoint(endpoint); } if (lastModifiedRequest != null) { - final ZonedDateTime end = lastModifiedRequest.minusDays(-120); + // make it UTC as required by NvdCveClientBuilder#withLastModifiedFilter + lastModifiedRequest = lastModifiedRequest.withZoneSameInstant(ZoneId.of("UTC")); + final ZonedDateTime end = lastModifiedRequest.plusDays(120); builder.withLastModifiedFilter(lastModifiedRequest, end); } final String key = settings.getString(Settings.KEYS.NVD_API_KEY);