]> Cypherpunks repositories - gostls13.git/commitdiff
time: update test for tzdata-2016g
authorAlberto Donizetti <alb.donizetti@gmail.com>
Thu, 29 Sep 2016 11:59:10 +0000 (13:59 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 29 Sep 2016 16:26:28 +0000 (16:26 +0000)
Fixes #17276

Change-Id: I0188cf9bc5fdb48c71ad929cc54206d03e0b96e4
Reviewed-on: https://go-review.googlesource.com/29995
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/time/time_test.go

index 68236fd64db93f351f6f2b0f85e62296f1771c26..2e47d0819d57b2817e875ef64c313cff3aaebea5 100644 (file)
@@ -943,8 +943,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)
        }
 }