Skip to content

Commit

Permalink
Fix timezone formatting in RFC 3339 output (#74)
Browse files Browse the repository at this point in the history
* Fix timezone formatting in RFC 3339 output

UTC or other time zone names or abbreviations are not valid there, need
to have Z or [-+]hh:mm.

* Use fixed 3 digits for RFC 3339 fractional seconds

Co-authored-by: Peter Bourgon <peterbourgon@users.noreply.github.com>

Co-authored-by: Peter Bourgon <peterbourgon@users.noreply.github.com>
  • Loading branch information
scop and peterbourgon authored Oct 20, 2021
1 parent 7fd0e3b commit fde8b63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/ulid/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

const (
defaultms = "Mon Jan 02 15:04:05.999 MST 2006"
rfc3339ms = "2006-01-02T15:04:05.999MST"
rfc3339ms = "2006-01-02T15:04:05.000Z07:00"
)

func main() {
Expand Down

0 comments on commit fde8b63

Please sign in to comment.