mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Advisories: Time filter download by 'updated' field in ROLIE entries. (#519)
* Use 'updated' field of ROLIE field entries to time filter downloads. * More suited variable naming
This commit is contained in:
parent
9073a8a282
commit
03e418182d
4 changed files with 2 additions and 40 deletions
|
|
@ -31,14 +31,6 @@ func NewTimeInterval(a, b time.Time) TimeRange {
|
|||
return TimeRange{a, b}
|
||||
}
|
||||
|
||||
// Year returns the time range for a given year.
|
||||
func Year(year int) TimeRange {
|
||||
return TimeRange{
|
||||
time.Date(year, time.January, 1, 0, 0, 0, 0, time.UTC),
|
||||
time.Date(year, time.December, 31, 23, 59, 59, int(time.Second-time.Nanosecond), time.UTC),
|
||||
}
|
||||
}
|
||||
|
||||
// guessDate tries to guess an RFC 3339 date time from a given string.
|
||||
func guessDate(s string) (time.Time, bool) {
|
||||
for _, layout := range []string{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue