diff options
author | Ian Lance Taylor <iant@golang.org> | 2016-06-08 21:15:26 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2016-06-09 15:32:48 +0000 |
commit | 894803c11e4eab128869be759463510580a68602 (patch) | |
tree | 6354c75b480c8f6d91bc5ab3576990c74792ba0b /src/time/format.go | |
parent | e2a30b8ffba065ea45bb1e18d1bb584898e3bf11 (diff) | |
download | go-894803c11e4eab128869be759463510580a68602.tar.gz go-894803c11e4eab128869be759463510580a68602.zip |
time: document that RFC822/1123 don't parse all RFC formats
Fixes #14505.
Change-Id: I46196b26c9339609e6e3ef9159de38c5b50c2a1b
Reviewed-on: https://go-review.googlesource.com/23922
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src/time/format.go')
-rw-r--r-- | src/time/format.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/time/format.go b/src/time/format.go index 13c2bb6e52..c2ae793020 100644 --- a/src/time/format.go +++ b/src/time/format.go @@ -51,6 +51,9 @@ import "errors" // use of "GMT" in that case. // In general RFC1123Z should be used instead of RFC1123 for servers // that insist on that format, and RFC3339 should be preferred for new protocols. +// 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. const ( ANSIC = "Mon Jan _2 15:04:05 2006" UnixDate = "Mon Jan _2 15:04:05 MST 2006" |