From: Alberto Donizetti Date: Thu, 29 Sep 2016 11:59:10 +0000 (+0200) Subject: time: update test for tzdata-2016g X-Git-Tag: archive/raspbian/1.7.4-2+rpi1+deb9u1^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=001084e3969e2254a56c8cd18184a989a268f882;p=golang-1.7.git time: update test for tzdata-2016g Fixes #17276 Change-Id: I0188cf9bc5fdb48c71ad929cc54206d03e0b96e4 Reviewed-on: https://go-review.googlesource.com/29995 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Gbp-Pq: Name cl-29995--tzdata-2016g.patch --- diff --git a/src/time/time_test.go b/src/time/time_test.go index b7ebb37..c9665ea 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) } }