summaryrefslogtreecommitdiff
path: root/pkg/ps/ps.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-01 14:40:18 +0100
committerGitHub <noreply@github.com>2020-12-01 14:40:18 +0100
commit24383906f891cea0c802f911deed43f8f8f2ac85 (patch)
treeed5d88792a902c311374241ae80256d5b1bf7d37 /pkg/ps/ps.go
parent9ae12f84e8d4704fe4c303fdedb12be8e4e73f59 (diff)
parent2d861ac14ad5b677717f357bd57c3f56f06307d5 (diff)
downloadpodman-24383906f891cea0c802f911deed43f8f8f2ac85.tar.gz
podman-24383906f891cea0c802f911deed43f8f8f2ac85.tar.bz2
podman-24383906f891cea0c802f911deed43f8f8f2ac85.zip
Merge pull request #8427 from rhatdan/ps
Handle ps container created field as a time.Time
Diffstat (limited to 'pkg/ps/ps.go')
-rw-r--r--pkg/ps/ps.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/ps/ps.go b/pkg/ps/ps.go
index 3dd7eb0c6..cfdf3ee49 100644
--- a/pkg/ps/ps.go
+++ b/pkg/ps/ps.go
@@ -180,7 +180,7 @@ func ListContainerBatch(rt *libpod.Runtime, ctr *libpod.Container, opts entities
ps := entities.ListContainer{
Command: conConfig.Command,
- Created: conConfig.CreatedTime.Unix(),
+ Created: conConfig.CreatedTime,
Exited: exited,
ExitCode: exitCode,
ExitedAt: exitedTime.Unix(),
@@ -231,7 +231,7 @@ func ListStorageContainer(rt *libpod.Runtime, ctr storage.Container, opts entiti
ps := entities.ListContainer{
ID: ctr.ID,
- Created: ctr.Created.Unix(),
+ Created: ctr.Created,
ImageID: ctr.ImageID,
State: "storage",
Names: []string{name},
@@ -301,5 +301,5 @@ func (a SortPSContainers) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
type SortPSCreateTime struct{ SortPSContainers }
func (a SortPSCreateTime) Less(i, j int) bool {
- return a.SortPSContainers[i].Created > a.SortPSContainers[j].Created
+ return a.SortPSContainers[i].Created.Before(a.SortPSContainers[j].Created)
}