Skip to content

Commit

Permalink
fix: Tranform into UTC the last modified date from database (#7222)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeremy Long <jeremy.long@gmail.com>
  • Loading branch information
ftiercelin and jeremylong authored Dec 4, 2024
1 parent 1c0f6d4 commit 97c3cee
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 97c3cee

Please sign in to comment.