From 92c7fcf137848ad74f88f75fc21bcb159eb08104 Mon Sep 17 00:00:00 2001 From: Sean Liao Date: Sat, 7 Feb 2026 14:45:46 +0000 Subject: [PATCH] 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 --- src/time/format.go | 3 +++ 1 file changed, 3 insertions(+) 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. -- 2.52.0