Skip to content

Commit 306c540

Browse files
committed
time: warn that RFC3339Nano does not guarantee a natural ordering
Fixes #19635 Change-Id: I85e725dbc85843afd0f4d82f5127fecacc1cb524 Reviewed-on: https://go-review.googlesource.com/47090 Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent f081266 commit 306c540

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/time/format.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ import "errors"
6161
// RFC822, RFC822Z, RFC1123, and RFC1123Z are useful for formatting;
6262
// when used with time.Parse they do not accept all the time formats
6363
// permitted by the RFCs.
64+
// The RFC3339Nano format removes trailing zeros from the seconds field
65+
// and thus may not sort correctly once formatted.
6466
const (
6567
ANSIC = "Mon Jan _2 15:04:05 2006"
6668
UnixDate = "Mon Jan _2 15:04:05 MST 2006"

0 commit comments

Comments
 (0)