Skip to content

Commit

Permalink
fix: use the correct timezone
Browse files Browse the repository at this point in the history
Co-authored-by: Hans Aikema <[email protected]>
  • Loading branch information
jeremylong and aikebah authored Nov 12, 2023
1 parent f51a6c9 commit 1e38434
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ protected final Map<String, String> getUpdatesNeeded(String url, Properties cach
// for establishing the current year use the timezone where the new year starts first
// as from that moment on CNAs might start assigning CVEs with the new year depending
// on the CNA's timezone
final int endYear = now.getYear();
final int endYear = now.withZoneSameInstant(ZoneId.of("UTC+14:00")).getYear();
boolean needsFullUpdate = false;
for (int y = startYear; y <= endYear; y++) {
final ZonedDateTime val = dbProperties.getTimestamp(DatabaseProperties.NVD_CACHE_LAST_MODIFIED + "." + y);
Expand Down

0 comments on commit 1e38434

Please sign in to comment.