Merge pull request #5415 from lentil32/master

fix: docstring for cli/command: `ContainerFormat.CreatedAt`
This commit is contained in:
Alano Terblanche 2024-09-09 12:19:53 +02:00 committed by GitHub
commit 6372ec9c75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -193,7 +193,9 @@ func (c *ContainerContext) Command() string {
return strconv.Quote(command) 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 { func (c *ContainerContext) CreatedAt() string {
return time.Unix(c.c.Created, 0).String() return time.Unix(c.c.Created, 0).String()
} }