Add CreatedAt format option to podman artifact ls

This change adds a .CreatedAt format option to the podman artifact ls
command to match the behavior of podman images --format CreatedAt.

The .Created field continues to display human-readable elapsed time
(e.g., '6 hours ago'), while the new .CreatedAt field displays the
full timestamp (e.g., '2025-10-23 12:34:56 +0000 UTC').

Changes:
- Refactored artifactListOutput struct to store time.Time value
- Added CreatedAt() method returning full timestamp string
- Added Created() method for human-readable duration
- Updated documentation to include .CreatedAt field
- Added e2e test for .CreatedAt format option

Generated-with: Cursor AI
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2025-10-23 09:22:03 -04:00
parent 2883e95ae5
commit 96ab027a3c
3 changed files with 43 additions and 15 deletions

View File

@@ -19,6 +19,7 @@ Print results with a Go template.
| **Placeholder** | **Description** |
|-----------------|------------------------------------------------|
| .Created | Elapsed time since the artifact was created |
| .CreatedAt | Full timestamp of when the artifact was created|
| .Digest | The computed digest of the artifact's manifest |
| .Repository | Repository name of the artifact |
| .Size | Size artifact in human readable units |