aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2016-10-28 20:21:52 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-10-28 20:21:52 +0000
commita5742b01585d78d5e9c39e8dbc9cfce7796af492 (patch)
tree12923cbf59577f25d9947be3fd7b38aae1f7ead0 /libgo
parente72531b9cb3c214731f0e0f64f53033d3efb80ca (diff)
downloadgcc-a5742b01585d78d5e9c39e8dbc9cfce7796af492.zip
gcc-a5742b01585d78d5e9c39e8dbc9cfce7796af492.tar.gz
gcc-a5742b01585d78d5e9c39e8dbc9cfce7796af492.tar.bz2
re PR go/78144 (FAIL: time on systems with tzdata2016g installed)
PR go/78144 libgo: incorporate fix for timezone test This brings over the test-only fix for issue 17276 into gccgo/libgo (with tzdata-2016g there is a new zone abbreviation). This is a copy of https://golang.org/cl/29995. Reviewed-on: https://go-review.googlesource.com/32182 From-SVN: r241661
Diffstat (limited to 'libgo')
-rw-r--r--libgo/go/time/time_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/libgo/go/time/time_test.go b/libgo/go/time/time_test.go
index b7ebb37..c9665ea 100644
--- a/libgo/go/time/time_test.go
+++ b/libgo/go/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)
}
}