Fix images prune filter until

This commits fixes until filter. It is now checking if the created
timestamp is before until filter value as expected in the docs.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
This commit is contained in:
Jakub Guzik
2021-04-24 21:42:00 +02:00
parent 476c76f580
commit 8edadd4c7e
2 changed files with 15 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ func generatePruneFilterFuncs(filter, filterValue string) (ImageFilter, error) {
return nil, err
}
return func(i *Image) bool {
if !until.IsZero() && i.Created().After((until)) {
if !until.IsZero() && i.Created().Before(until) {
return true
}
return false