[go] time: document that Parse does not support leap seconds

0 views
Skip to first unread message

Sean Liao (Gerrit)

unread,
9:46 AM (5 hours ago) 9:46 AM
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Sean Liao has uploaded the change for review

Commit message

time: document that Parse does not support leap seconds

Fixes #50888
Change-Id: I2691442d7fccd716cd19939cf3931317e21ee4ed

Change diff

diff --git a/src/time/format.go b/src/time/format.go
index ad5486f..cf5d6c7 100644
--- a/src/time/format.go
+++ b/src/time/format.go
@@ -1002,6 +1002,9 @@
// 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.

Change information

Files:
  • M src/time/format.go
Change size: XS
Delta: 1 file changed, 3 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I2691442d7fccd716cd19939cf3931317e21ee4ed
Gerrit-Change-Number: 743060
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Liao <se...@liao.dev>
Gerrit-Reviewer: Sean Liao <se...@liao.dev>
unsatisfied_requirement
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages