From 94d44451c1cfabb0d2dedf687ba2582ab1a7ab87 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 4 May 2021 17:00:13 +0900 Subject: [PATCH] logs: fix time format `nerdctl logs -t` was using a wrong format. Before: 2021-05-04 07:55:03.793126406 +0000 UTC After: 2021-05-04T07:55:37.824054101Z Signed-off-by: Akihiro Suda --- pkg/logging/jsonfile/jsonfile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/logging/jsonfile/jsonfile.go b/pkg/logging/jsonfile/jsonfile.go index cffabc62ca8..3d3dbe94ab5 100644 --- a/pkg/logging/jsonfile/jsonfile.go +++ b/pkg/logging/jsonfile/jsonfile.go @@ -122,7 +122,7 @@ func Decode(stdout, stderr io.Writer, r io.Reader, timestamps bool, since string } if timestamps { - output = append(output, []byte(e.Time.String())...) + output = append(output, []byte(e.Time.Format(time.RFC3339Nano))...) output = append(output, ' ') }