Skip to content

Commit

Permalink
fix: correct NVD cache last checked logic (#6218)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong authored Dec 5, 2023
1 parent 9eb5457 commit 4c44019
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ private boolean checkUpdate() throws UpdateException {
final ZonedDateTime lastChecked = dbProperties.getTimestamp(DatabaseProperties.NVD_CACHE_LAST_CHECKED);
if (lastChecked == null) {
final ZonedDateTime now = ZonedDateTime.now(ZoneId.of("UTC"));
final Duration duration = Duration.between(now, lastChecked);
final Duration duration = Duration.between(lastChecked, now);
final long difference = duration.getSeconds();
proceed = difference > validForSeconds;
if (!proceed) {
Expand Down

0 comments on commit 4c44019

Please sign in to comment.