]> Cypherpunks repositories - gostls13.git/commitdiff
time: warn that RFC3339Nano does not guarantee a natural ordering
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 28 Jun 2017 22:07:06 +0000 (22:07 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 29 Jun 2017 03:29:22 +0000 (03:29 +0000)
Fixes #19635

Change-Id: I85e725dbc85843afd0f4d82f5127fecacc1cb524
Reviewed-on: https://go-review.googlesource.com/47090
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/time/format.go

index 37e759f890dbc81512ccb91ecf209779632c5df0..852138977beb78e0055c93b86255db35aa33c0c5 100644 (file)
@@ -61,6 +61,8 @@ import "errors"
 // RFC822, RFC822Z, RFC1123, and RFC1123Z are useful for formatting;
 // when used with time.Parse they do not accept all the time formats
 // permitted by the RFCs.
+// The RFC3339Nano format removes trailing zeros from the seconds field
+// and thus may not sort correctly once formatted.
 const (
        ANSIC       = "Mon Jan _2 15:04:05 2006"
        UnixDate    = "Mon Jan _2 15:04:05 MST 2006"