Commit c5434f29 authored by Alberto Donizetti's avatar Alberto Donizetti Committed by Brad Fitzpatrick

time: update test for tzdata-2016g

Fixes #17276

Change-Id: I0188cf9bc5fdb48c71ad929cc54206d03e0b96e4
Reviewed-on: https://go-review.googlesource.com/29995Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 731b3ed1
...@@ -943,8 +943,11 @@ func TestLoadFixed(t *testing.T) { ...@@ -943,8 +943,11 @@ func TestLoadFixed(t *testing.T) {
// but Go and most other systems use "east is positive". // but Go and most other systems use "east is positive".
// So GMT+1 corresponds to -3600 in the Go zone, not +3600. // So GMT+1 corresponds to -3600 in the Go zone, not +3600.
name, offset := Now().In(loc).Zone() name, offset := Now().In(loc).Zone()
if name != "GMT+1" || offset != -1*60*60 { // The zone abbreviation is "-01" since tzdata-2016g, and "GMT+1"
t.Errorf("Now().In(loc).Zone() = %q, %d, want %q, %d", name, offset, "GMT+1", -1*60*60) // 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)
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment