From: Sean Liao Date: Sat, 7 Feb 2026 14:45:46 +0000 (+0000) Subject: time: document that Parse does not support leap seconds X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=92c7fcf137848ad74f88f75fc21bcb159eb08104;p=gostls13.git time: document that Parse does not support leap seconds Fixes #50888 Change-Id: I2691442d7fccd716cd19939cf3931317e21ee4ed Reviewed-on: https://go-review.googlesource.com/c/go/+/743060 Reviewed-by: Michael Pratt Reviewed-by: Junyang Shao LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor --- diff --git a/src/time/format.go b/src/time/format.go index ad5486f4d2..cf5d6c712d 100644 --- a/src/time/format.go +++ b/src/time/format.go @@ -1002,6 +1002,9 @@ func skip(value, prefix string) (string, error) { // For layouts specifying the two-digit year 06, a value NN >= 69 will be treated // as 19NN and a value NN < 69 will be treated as 20NN. // +// Timestamps representing leap seconds (second 60) cannot be parsed. +// These are not representable by [Time]. +// // The remainder of this comment describes the handling of time zones. // // In the absence of a time zone indicator, Parse returns a time in UTC.