From 099498db0e47ba01ec405ca27662d9a87ef921e2 Mon Sep 17 00:00:00 2001 From: Alberto Donizetti Date: Sat, 4 Aug 2018 12:04:52 +0200 Subject: [PATCH] time: always run ZoneAbbr test CL 52430 added logic to skip the testZoneAbbr test in locales where the timezone does not have a three-letter name, because the following line Parse(RFC1123, t1.Format(RFC1123)) failed for timezones with only numeric names (like -07). Since Go 1.11, Parse supports the parsing of timezones with numeric names (this was implemented in CL 98157), so we can now run the test unconditionally. Change-Id: I8ed40e1ba325c0c0dc79c4184a9e71209e2e9a02 Reviewed-on: https://go-review.googlesource.com/127757 Run-TryBot: Alberto Donizetti TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/time/zoneinfo_windows_test.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/time/zoneinfo_windows_test.go b/src/time/zoneinfo_windows_test.go index d0f2a444fe..f23d9dcecb 100644 --- a/src/time/zoneinfo_windows_test.go +++ b/src/time/zoneinfo_windows_test.go @@ -15,13 +15,6 @@ func testZoneAbbr(t *testing.T) { // discard nsec t1 = Date(t1.Year(), t1.Month(), t1.Day(), t1.Hour(), t1.Minute(), t1.Second(), 0, t1.Location()) - // Skip the test if we're in a timezone with no abbreviation. - // Format will fallback to the numeric abbreviation, and - // Parse(RFC1123, ..) will fail (see Issue 21183). - if tz := t1.Format("MST"); tz[0] == '-' || tz[0] == '+' { - t.Skip("No zone abbreviation") - } - t2, err := Parse(RFC1123, t1.Format(RFC1123)) if err != nil { t.Fatalf("Parse failed: %v", err) -- 2.50.0