Skip to content

Commit

Permalink
format time
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared committed Feb 20, 2025
1 parent 578f9ab commit 9d68e80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions log/logtest/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ func Example() {
// Print out.
for _, records := range got {
for _, record := range records {
fmt.Printf("%s: %s: %s\n", record.Timestamp, record.Severity, record.Body)
fmt.Printf("%s: %s: %s\n", record.Timestamp.Format(time.RFC3339Nano), record.Severity, record.Body)
}
}

// Output:
// 0001-01-01 00:00:00 +0000 UTC: INFO: Hello there
// 0001-01-01T00:00:00Z: INFO: Hello there
}

0 comments on commit 9d68e80

Please sign in to comment.