Skip to content

Commit

Permalink
logs: fix time format
Browse files Browse the repository at this point in the history
`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 <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed May 4, 2021
1 parent 0ed2df8 commit 94d4445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/logging/jsonfile/jsonfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, ' ')
}

Expand Down

0 comments on commit 94d4445

Please sign in to comment.