mirror of
https://github.com/LIV2/bebbo-gcc.git
synced 2025-12-06 00:23:32 +00:00
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
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@241662 138bc75d-0d04-0410-961f-82ee72b054a4
This commit is contained in:
parent
996c7efd42
commit
4e67490dec
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user