Skip to content

Commit c5434f2

Browse files
ALTreebradfitz
authored andcommitted
time: update test for tzdata-2016g
Fixes #17276 Change-Id: I0188cf9bc5fdb48c71ad929cc54206d03e0b96e4 Reviewed-on: https://go-review.googlesource.com/29995 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 731b3ed commit c5434f2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/time/time_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,11 @@ func TestLoadFixed(t *testing.T) {
943943
// but Go and most other systems use "east is positive".
944944
// So GMT+1 corresponds to -3600 in the Go zone, not +3600.
945945
name, offset := Now().In(loc).Zone()
946-
if name != "GMT+1" || offset != -1*60*60 {
947-
t.Errorf("Now().In(loc).Zone() = %q, %d, want %q, %d", name, offset, "GMT+1", -1*60*60)
946+
// The zone abbreviation is "-01" since tzdata-2016g, and "GMT+1"
947+
// on earlier versions; we accept both. (Issue #17276).
948+
if !(name == "GMT+1" || name == "-01") || offset != -1*60*60 {
949+
t.Errorf("Now().In(loc).Zone() = %q, %d, want %q or %q, %d",
950+
name, offset, "GMT+1", "-01", -1*60*60)
948951
}
949952
}
950953

0 commit comments

Comments
 (0)