aboutsummaryrefslogtreecommitdiff
path: root/src/time/example_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2019-10-15 07:12:26 -0700
committerIan Lance Taylor <iant@golang.org>2019-10-15 17:48:38 +0000
commit47759fbab76cb4b4de93382158fae5d27924979f (patch)
tree7e694aa17c0f422dae9fe959ca9bff99b050fccb /src/time/example_test.go
parent2c87be436bddd9b49f11959adee1ae817cb48ee1 (diff)
downloadgo-47759fbab76cb4b4de93382158fae5d27924979f.tar.xz
time: avoid or clarify CEST
In the tzdata database CEST is not recognized as a timezone name. It is used as the abbreviated name for daylight saving time in Central Europe. Avoid using CEST in documentation as it suggests that programs can parse dates that use CEST, which will typically fail on Unix systems. Updates #34913 Change-Id: I4b22f7d06607eb5b066812a48af58edd95498286 Reviewed-on: https://go-review.googlesource.com/c/go/+/201197 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/time/example_test.go')
-rw-r--r--src/time/example_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/time/example_test.go b/src/time/example_test.go
index 4d70471a7d..2f890db2f4 100644
--- a/src/time/example_test.go
+++ b/src/time/example_test.go
@@ -363,6 +363,7 @@ func ExampleParse() {
func ExampleParseInLocation() {
loc, _ := time.LoadLocation("Europe/Berlin")
+ // This will look for the name CEST in the Europe/Berlin time zone.
const longForm = "Jan 2, 2006 at 3:04pm (MST)"
t, _ := time.ParseInLocation(longForm, "Jul 9, 2012 at 5:02am (CEST)", loc)
fmt.Println(t)