mirror of https://github.com/golang/go.git
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 <iant@golang.org>
This commit is contained in:
parent
f081266e4a
commit
306c540a28
|
|
@ -61,6 +61,8 @@ import "errors"
|
||||||
// RFC822, RFC822Z, RFC1123, and RFC1123Z are useful for formatting;
|
// RFC822, RFC822Z, RFC1123, and RFC1123Z are useful for formatting;
|
||||||
// when used with time.Parse they do not accept all the time formats
|
// when used with time.Parse they do not accept all the time formats
|
||||||
// permitted by the RFCs.
|
// permitted by the RFCs.
|
||||||
|
// The RFC3339Nano format removes trailing zeros from the seconds field
|
||||||
|
// and thus may not sort correctly once formatted.
|
||||||
const (
|
const (
|
||||||
ANSIC = "Mon Jan _2 15:04:05 2006"
|
ANSIC = "Mon Jan _2 15:04:05 2006"
|
||||||
UnixDate = "Mon Jan _2 15:04:05 MST 2006"
|
UnixDate = "Mon Jan _2 15:04:05 MST 2006"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue