Skip to content

Commit f5dd484

Browse files
ALTreebradfitz
authored andcommitted
[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 <[email protected]> Reviewed-by: Joe Tsai <[email protected]> Reviewed-by: Alberto Donizetti <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 70e9806 commit f5dd484

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
@@ -939,8 +939,11 @@ func TestLoadFixed(t *testing.T) {
939939
// but Go and most other systems use "east is positive".
940940
// So GMT+1 corresponds to -3600 in the Go zone, not +3600.
941941
name, offset := Now().In(loc).Zone()
942-
if name != "GMT+1" || offset != -1*60*60 {
943-
t.Errorf("Now().In(loc).Zone() = %q, %d, want %q, %d", name, offset, "GMT+1", -1*60*60)
942+
// The zone abbreviation is "-01" since tzdata-2016g, and "GMT+1"
943+
// on earlier versions; we accept both. (Issue #17276).
944+
if !(name == "GMT+1" || name == "-01") || offset != -1*60*60 {
945+
t.Errorf("Now().In(loc).Zone() = %q, %d, want %q or %q, %d",
946+
name, offset, "GMT+1", "-01", -1*60*60)
944947
}
945948
}
946949

0 commit comments

Comments
 (0)