Skip to content

[Bug]: JSON createdAt encoding differs between list and inspect output #1533

@realrajaryan

Description

@realrajaryan

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

Create a volume and compare createdAt in list and inspect JSON:

$ container volume create issue-vol-small -s 2MiB
issue-vol-small

$ container volume list --format json
[{"createdAt":800212872.195543,"options":{"size":"2MiB"},"sizeInBytes":2097152,"format":"ext4","source":"\/Users\/ras\/Downloads\/test_container\/audit_artifacts\/container-issue-repros-20260511-101939\/app-root\/volumes\/issue-vol-small\/volume.img","driver":"local","labels":{},"name":"issue-vol-small"}]

$ container volume inspect issue-vol-small
[
  {
    "createdAt" : "2026-05-11T17:21:12Z",
    "driver" : "local",
    "format" : "ext4",
    "labels" : {

    },
    "name" : "issue-vol-small",
    "options" : {
      "size" : "2MiB"
    },
    "sizeInBytes" : 2097152,
    "source" : "\/Users\/ras\/Downloads\/test_container\/audit_artifacts\/container-issue-repros-20260511-101939\/app-root\/volumes\/issue-vol-small\/volume.img"
  }
]

Problem description

The same JSON field uses different encodings for the same resource type. List output emits a numeric timestamp, while inspect output emits an ISO-8601 string. JSON consumers should not need different timestamp parsers for the same field.

Environment

- OS: macOS 26.4.1 (25E253)
- Xcode: Xcode 26.4.1 (17E202)
- Container: container CLI 0.12.3 (build: release, commit: f989901)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions