summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/image/prune.go9
-rw-r--r--libpod/network/netconflist.go2
2 files changed, 2 insertions, 9 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
diff --git a/libpod/network/netconflist.go b/libpod/network/netconflist.go
index 179620a0d..08816f2bd 100644
--- a/libpod/network/netconflist.go
+++ b/libpod/network/netconflist.go
@@ -262,7 +262,7 @@ func IfPassesPruneFilter(config *config.Config, netconf *libcni.NetworkConfigLis
case "label":
return util.MatchLabelFilters(filterValues, GetNetworkLabels(netconf)), nil
case "until":
- until, err := util.ComputeUntilTimestamp(key, filterValues)
+ until, err := util.ComputeUntilTimestamp(filterValues)
if err != nil {
return false, err
}