@@ -379,7 +379,13 @@ fn human_render_imagestatus(
379
379
let digest = & image. image_digest ;
380
380
writeln ! ( out, "{digest}" ) ?;
381
381
382
- let timestamp = image. timestamp . as_ref ( ) ;
382
+ // Format the timestamp without nanoseconds since those are just irrelevant noise for human
383
+ // consumption - that time scale should basically never matter for container builds.
384
+ let timestamp = image
385
+ . timestamp
386
+ . as_ref ( )
387
+ // This format is the same as RFC3339, just without nanos.
388
+ . map ( |t| t. to_utc ( ) . format ( "%Y-%m-%dT%H:%M:%SZ" ) ) ;
383
389
// If we have a version, combine with timestamp
384
390
if let Some ( version) = image. version . as_deref ( ) {
385
391
write_row_name ( & mut out, "Version" , prefix_len) ?;
@@ -466,11 +472,11 @@ mod tests {
466
472
let expected = indoc:: indoc! { r"
467
473
Staged image: quay.io/example/someimage:latest
468
474
Digest: sha256:16dc2b6256b4ff0d2ec18d2dbfb06d117904010c8cf9732cdb022818cf7a7566
469
- Version: nightly (2023-10-14 19 :22:15 UTC )
475
+ Version: nightly (2023-10-14T19 :22:15Z )
470
476
471
477
● Booted image: quay.io/example/someimage:latest
472
478
Digest: sha256:736b359467c9437c1ac915acaae952aad854e07eb4a16a94999a48af08c83c34
473
- Version: nightly (2023-09-30 19 :22:16 UTC )
479
+ Version: nightly (2023-09-30T19 :22:16Z )
474
480
" } ;
475
481
similar_asserts:: assert_eq!( w, expected) ;
476
482
}
0 commit comments