diff options
author | Alberto Donizetti <alb.donizetti@gmail.com> | 2016-09-29 13:59:10 +0200 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-01-25 17:17:16 +0000 |
commit | f5dd484480276f5d848a8f43b8b451429526b220 (patch) | |
tree | cf52b828acc92e61530cf03778046cdf4c5f33f3 | |
parent | 70e980631c52e9705cd92cbc6904ed24f339e2d2 (diff) | |
download | go-f5dd484480276f5d848a8f43b8b451429526b220.tar.gz go-f5dd484480276f5d848a8f43b8b451429526b220.zip |
[release-branch.go1.7] time: update test for tzdata-2016g
Backport of the fix to #17276 for Go 1.7.
Change-Id: Ifc1a8e2a81d4e543dbef04566985618884a8c0e0
Reviewed-on: https://go-review.googlesource.com/35635
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r-- | src/time/time_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/time/time_test.go b/src/time/time_test.go index b7ebb37296..c9665ea04b 100644 --- a/src/time/time_test.go +++ b/src/time/time_test.go @@ -939,8 +939,11 @@ func TestLoadFixed(t *testing.T) { // but Go and most other systems use "east is positive". // So GMT+1 corresponds to -3600 in the Go zone, not +3600. name, offset := Now().In(loc).Zone() - if name != "GMT+1" || offset != -1*60*60 { - t.Errorf("Now().In(loc).Zone() = %q, %d, want %q, %d", name, offset, "GMT+1", -1*60*60) + // The zone abbreviation is "-01" since tzdata-2016g, and "GMT+1" + // on earlier versions; we accept both. (Issue #17276). + if !(name == "GMT+1" || name == "-01") || offset != -1*60*60 { + t.Errorf("Now().In(loc).Zone() = %q, %d, want %q or %q, %d", + name, offset, "GMT+1", "-01", -1*60*60) } } |