aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2012-04-04 06:54:39 +1000
committerRob Pike <r@golang.org>2012-04-04 06:54:39 +1000
commit02c38a83b9a68d4c3e90c18415c99e5f5b36dc94 (patch)
tree7ea8204e947f1a4e0f73b70d7abe0319b3ee11c1
parent6b68716f85840f265f2a6605d12ae08757c52a91 (diff)
downloadgo-02c38a83b9a68d4c3e90c18415c99e5f5b36dc94.tar.gz
go-02c38a83b9a68d4c3e90c18415c99e5f5b36dc94.zip
[release-branch.go1] time.RFC822: make the string standard-compliant
««« backport fda7b4c9978d time.RFC822: make the string standard-compliant For mysterious reasons, the existing string was just wrong: it was missing a colon. There is no apparent reason for this discrepancy. This should be safe to fix because existing uses would not be RFC822-compliant; people cannot be depending on it to generate correct mail headers. Fixes #3444. R=golang-dev, dsymonds, iant, rsc CC=golang-dev https://golang.org/cl/5969072 »»»
-rw-r--r--src/pkg/time/format.go4
-rw-r--r--src/pkg/time/time_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/time/format.go b/src/pkg/time/format.go
index ad52bab216..98d4bb5c65 100644
--- a/src/pkg/time/format.go
+++ b/src/pkg/time/format.go
@@ -41,8 +41,8 @@ const (
ANSIC = "Mon Jan _2 15:04:05 2006"
UnixDate = "Mon Jan _2 15:04:05 MST 2006"
RubyDate = "Mon Jan 02 15:04:05 -0700 2006"
- RFC822 = "02 Jan 06 1504 MST"
- RFC822Z = "02 Jan 06 1504 -0700" // RFC822 with numeric zone
+ RFC822 = "02 Jan 06 15:04 MST"
+ RFC822Z = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone
RFC850 = "Monday, 02-Jan-06 15:04:05 MST"
RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST"
RFC1123Z = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone
diff --git a/src/pkg/time/time_test.go b/src/pkg/time/time_test.go
index 3430526b8b..fdff0ec36c 100644
--- a/src/pkg/time/time_test.go
+++ b/src/pkg/time/time_test.go
@@ -223,7 +223,7 @@ var formatTests = []FormatTest{
{"ANSIC", ANSIC, "Wed Feb 4 21:00:57 2009"},
{"UnixDate", UnixDate, "Wed Feb 4 21:00:57 PST 2009"},
{"RubyDate", RubyDate, "Wed Feb 04 21:00:57 -0800 2009"},
- {"RFC822", RFC822, "04 Feb 09 2100 PST"},
+ {"RFC822", RFC822, "04 Feb 09 21:00 PST"},
{"RFC850", RFC850, "Wednesday, 04-Feb-09 21:00:57 PST"},
{"RFC1123", RFC1123, "Wed, 04 Feb 2009 21:00:57 PST"},
{"RFC1123Z", RFC1123Z, "Wed, 04 Feb 2009 21:00:57 -0800"},