]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.20] time: revert strict parsing of RFC 3339
authorJoe Tsai <joetsai@digital-static.net>
Wed, 18 Jan 2023 18:22:54 +0000 (13:22 -0500)
committerGopher Robot <gobot@golang.org>
Wed, 18 Jan 2023 20:42:20 +0000 (20:42 +0000)
commit5adb0ca8e93d24d47fc3a9fbf03296cbe22fcc35
treebddf74a1e6971a773219a77c813c8c6f2c4c99dc
parent8b34676710eebe9b6fb7ea6d4fde6ae9a18d7ac9
[release-branch.go1.20] time: revert strict parsing of RFC 3339

CL 444277 fixed Time.UnmarshalText and Time.UnmarshalJSON to properly
unmarshal timestamps according to RFC 3339 instead of according
to Go's bespoke time syntax that is a superset of RFC 3339.

However, this change seems to have broken an AWS S3 unit test
that relies on parsing timestamps with single digit hours.
It is unclear whether S3 emits these timestamps in production or
whether this is simply a testing artifact that has been cargo culted
across many code bases. Either way, disable strict parsing for now
and re-enable later with better GODEBUG support.

Updates #54580

Change-Id: Icced2c7f9a6b2fc06bbd9c7e90f90edce24c2306
Reviewed-on: https://go-review.googlesource.com/c/go/+/462286
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/462675
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
doc/go1.20.html
src/time/format_rfc3339.go
src/time/time_test.go