]> Cypherpunks repositories - gostls13.git/commit
time: fix time zone parsing when format includes time zone seconds
authorDarin Krauss <darinkrauss@gmail.com>
Mon, 1 Jul 2024 17:25:28 +0000 (13:25 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 2 Jul 2024 20:01:50 +0000 (20:01 +0000)
commitf12ac5be7045efcde39025c32cc01a20a305012c
treeef32a2bba8569e9ade20b582e9757ee11ac9b940
parent09aeb6e33ab426eff4676a3baf694d5a3019e9fc
time: fix time zone parsing when format includes time zone seconds

The current implementation fails to parse a time string with a "Z"
time zone using a time format that includes time zone seconds. This
fix correctly parses the "Z" time zone for any Z-base time format
that includes seconds (i.e. "Z070000" or "Z07:00:00").

Fixes #68263

Change-Id: Idf8fa06b5f96383f050c4ffbd2bc5804fd408650
Reviewed-on: https://go-review.googlesource.com/c/go/+/595897
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/time/format.go
src/time/format_test.go