@@ -379,7 +379,13 @@ fn human_render_imagestatus(
379379 let digest = & image. image_digest ;
380380 writeln ! ( out, "{digest}" ) ?;
381381
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" ) ) ;
383389 // If we have a version, combine with timestamp
384390 if let Some ( version) = image. version . as_deref ( ) {
385391 write_row_name ( & mut out, "Version" , prefix_len) ?;
@@ -466,11 +472,11 @@ mod tests {
466472 let expected = indoc:: indoc! { r"
467473 Staged image: quay.io/example/someimage:latest
468474 Digest: sha256:16dc2b6256b4ff0d2ec18d2dbfb06d117904010c8cf9732cdb022818cf7a7566
469- Version: nightly (2023-10-14 19 :22:15 UTC )
475+ Version: nightly (2023-10-14T19 :22:15Z )
470476
471477 ● Booted image: quay.io/example/someimage:latest
472478 Digest: sha256:736b359467c9437c1ac915acaae952aad854e07eb4a16a94999a48af08c83c34
473- Version: nightly (2023-09-30 19 :22:16 UTC )
479+ Version: nightly (2023-09-30T19 :22:16Z )
474480 " } ;
475481 similar_asserts:: assert_eq!( w, expected) ;
476482 }
0 commit comments