From fde8b63b05997b245920d718e8bfe46fe5d62c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 20 Oct 2021 23:23:04 +0300 Subject: [PATCH] Fix timezone formatting in RFC 3339 output (#74) * 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 Co-authored-by: Peter Bourgon --- cmd/ulid/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ulid/main.go b/cmd/ulid/main.go index ee4173b..50e62cc 100644 --- a/cmd/ulid/main.go +++ b/cmd/ulid/main.go @@ -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() {