1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00

If using folder per year based date checks assume last second of 31 december

This commit is contained in:
Sascha L. Teichmann 2022-07-17 14:35:37 +02:00
parent ec0548bef6
commit b39553fc9a

View file

@ -371,15 +371,15 @@ func (p *processor) integrity(
if m := yearFromURL.FindStringSubmatch(u); m != nil {
year, _ := strconv.Atoi(m[1])
folderYear = &year
// Check if we are in checking time interval.
if p.ageAccept != nil && !p.ageAccept(
time.Date(
year+1, 1, 1, // Assume 1. jan of next year.
0, 0, 0, 0,
year, 12, 31, // Assume last day og year.
23, 59, 59, 0, // 23:59:59
time.UTC)) {
continue
}
folderYear = &year
}
res, err := client.Get(u)