]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: document TimeFormat more
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Jan 2016 18:55:35 +0000 (18:55 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Jan 2016 19:52:20 +0000 (19:52 +0000)
Fixes #14103

Change-Id: I89963643eccc902b809e04b7a14153acb0d242e1
Reviewed-on: https://go-review.googlesource.com/18933
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/http/server.go

index 2ec106927b91b0fc1487f2e0f3e18aa7be5fb60a..004a1f92fc4da31f03a67360b16acc51b4dd4117 100644 (file)
@@ -648,10 +648,12 @@ func (ecr *expectContinueReader) Close() error {
        return ecr.readCloser.Close()
 }
 
-// TimeFormat is the time format to use with
-// time.Parse and time.Time.Format when parsing
-// or generating times in HTTP headers.
-// It is like time.RFC1123 but hard codes GMT as the time zone.
+// TimeFormat is the time format to use when generating times in HTTP
+// headers. It is like time.RFC1123 but hard-codes GMT as the time
+// zone. The time being formatted must be in UTC for Format to
+// generate the correct format.
+//
+// For parsing this time format, see ParseTime.
 const TimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT"
 
 // appendTime is a non-allocating version of []byte(t.UTC().Format(TimeFormat))