Skip to content

Commit

Permalink
cli/command: fix docstring for ContainerFormat.CreatedAt
Browse files Browse the repository at this point in the history
Signed-off-by: lentil32 <[email protected]>
  • Loading branch information
lentil32 committed Sep 8, 2024
1 parent 6b74160 commit 0b9d582
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/command/formatter/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ 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 formatted string representing the container's creation date/time.
// The format may include nanoseconds if present.
// e.g. "2006-01-02 15:04:05.999999999 -0700 MST" or "2006-01-02 15:04:05 -0700 MST"
func (c *ContainerContext) CreatedAt() string {
return time.Unix(c.c.Created, 0).String()
}
Expand Down

0 comments on commit 0b9d582

Please sign in to comment.