mirror of
https://github.com/golang/go.git
synced 2025-05-18 22:04:38 +00:00
net/http: document TimeFormat more
Fixes #14103 Change-Id: I89963643eccc902b809e04b7a14153acb0d242e1 Reviewed-on: https://go-review.googlesource.com/18933 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
bdc3db0b0c
commit
2c12b81739
@ -648,10 +648,12 @@ func (ecr *expectContinueReader) Close() error {
|
|||||||
return ecr.readCloser.Close()
|
return ecr.readCloser.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TimeFormat is the time format to use with
|
// TimeFormat is the time format to use when generating times in HTTP
|
||||||
// time.Parse and time.Time.Format when parsing
|
// headers. It is like time.RFC1123 but hard-codes GMT as the time
|
||||||
// or generating times in HTTP headers.
|
// zone. The time being formatted must be in UTC for Format to
|
||||||
// It is like time.RFC1123 but hard codes GMT as the time zone.
|
// generate the correct format.
|
||||||
|
//
|
||||||
|
// For parsing this time format, see ParseTime.
|
||||||
const TimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT"
|
const TimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT"
|
||||||
|
|
||||||
// appendTime is a non-allocating version of []byte(t.UTC().Format(TimeFormat))
|
// appendTime is a non-allocating version of []byte(t.UTC().Format(TimeFormat))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user