]> Cypherpunks repositories - gostls13.git/commitdiff
time: document that Parse does not support leap seconds
authorSean Liao <sean@liao.dev>
Sat, 7 Feb 2026 14:45:46 +0000 (14:45 +0000)
committerSean Liao <sean@liao.dev>
Thu, 12 Feb 2026 20:37:42 +0000 (12:37 -0800)
Fixes #50888

Change-Id: I2691442d7fccd716cd19939cf3931317e21ee4ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/743060
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/time/format.go

index ad5486f4d28f8930b37b01ec6e0957302395956e..cf5d6c712dba0628d88887c2882c3c15776ddf11 100644 (file)
@@ -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.