summaryrefslogtreecommitdiff
path: root/libpod/image
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-03-24 00:42:42 +0100
committerJakub Guzik <jakubmguzik@gmail.com>2021-03-24 00:56:00 +0100
commit914218c1e8fd0dc11c1caee807bbed0cf26fdaf8 (patch)
tree4af0786346f704b0ea0765d34ea52740b622e5ba /libpod/image
parent5eab1b07428e4078bd15ca5b69f28f2733850cdd (diff)
downloadpodman-914218c1e8fd0dc11c1caee807bbed0cf26fdaf8.tar.gz
podman-914218c1e8fd0dc11c1caee807bbed0cf26fdaf8.tar.bz2
podman-914218c1e8fd0dc11c1caee807bbed0cf26fdaf8.zip
Unification of until filter across list/prune endpoints
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'libpod/image')
-rw-r--r--libpod/image/prune.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/libpod/image/prune.go b/libpod/image/prune.go
index 1ab785dd2..7ee3e077e 100644
--- a/libpod/image/prune.go
+++ b/libpod/image/prune.go
@@ -3,11 +3,9 @@ package image
import (
"context"
"strings"
- "time"
"github.com/containers/podman/v3/libpod/events"
"github.com/containers/podman/v3/pkg/domain/entities/reports"
- "github.com/containers/podman/v3/pkg/timetype"
"github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
"github.com/pkg/errors"
@@ -26,15 +24,10 @@ func generatePruneFilterFuncs(filter, filterValue string) (ImageFilter, error) {
}, nil
case "until":
- ts, err := timetype.GetTimestamp(filterValue, time.Now())
+ until, err := util.ComputeUntilTimestamp([]string{filterValue})
if err != nil {
return nil, err
}
- seconds, nanoseconds, err := timetype.ParseTimestamps(ts, 0)
- if err != nil {
- return nil, err
- }
- until := time.Unix(seconds, nanoseconds)
return func(i *Image) bool {
if !until.IsZero() && i.Created().After((until)) {
return true