aboutsummaryrefslogtreecommitdiff
path: root/src/time/time_test.go
diff options
context:
space:
mode:
authorAlberto Donizetti <alb.donizetti@gmail.com>2016-09-29 13:59:10 +0200
committerBrad Fitzpatrick <bradfitz@golang.org>2016-09-29 16:26:28 +0000
commitc5434f2973a87acff76bac359236e690d632ce95 (patch)
tree36ae9c9bb8884c6a6857cb9116d57d3ed91c0ad0 /src/time/time_test.go
parent731b3ed18dcb854912cb06b3486bb633917e4cb7 (diff)
downloadgo-c5434f2973a87acff76bac359236e690d632ce95.tar.gz
go-c5434f2973a87acff76bac359236e690d632ce95.zip
time: update test for tzdata-2016g
Fixes #17276 Change-Id: I0188cf9bc5fdb48c71ad929cc54206d03e0b96e4 Reviewed-on: https://go-review.googlesource.com/29995 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/time/time_test.go')
-rw-r--r--src/time/time_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/time/time_test.go b/src/time/time_test.go
index 68236fd64d..2e47d0819d 100644
--- a/src/time/time_test.go
+++ b/src/time/time_test.go
@@ -943,8 +943,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)
}
}