mirror of https://github.com/docker/cli.git
cli/command: fix ContainerFormat's CreatedAt docstring and add CreatedAtTimestamp
Signed-off-by: Jonathan Rasmussen <contact@jonathanjrasmussen.com>
This commit is contained in:
parent
605942cb2c
commit
2f196aae97
|
@ -189,11 +189,16 @@ func (c *ContainerContext) Command() string {
|
|||
return strconv.Quote(command)
|
||||
}
|
||||
|
||||
// CreatedAt returns the "Created" date/time of the container as a unix timestamp.
|
||||
// CreatedAt returns the "Created" date/time of the container as a stringified unix timestamp.
|
||||
func (c *ContainerContext) CreatedAt() string {
|
||||
return time.Unix(c.c.Created, 0).String()
|
||||
}
|
||||
|
||||
// CreatedAtTimestamp returns the "Created" date/time of the container as a unix timestamp.
|
||||
func (c *ContainerContext) CreatedAtTimestamp() time.Time {
|
||||
return time.Unix(c.c.Created, 0)
|
||||
}
|
||||
|
||||
// RunningFor returns a human-readable representation of the duration for which
|
||||
// the container has been running.
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue