mirror of
https://github.com/golang/go
synced 2024-11-19 10:34:46 -07:00
Revert "time: zoneinfo support on darwin/arm"
This reverts commit 54efdc596f
.
Broken on darwin.
Change-Id: Ic74275f36d30975263340e2b4045226eae71b16a
Reviewed-on: https://go-review.googlesource.com/6514
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
54efdc596f
commit
31336f9c11
@ -383,10 +383,6 @@ func TestOverflowSleep(t *testing.T) {
|
|||||||
// Test that a panic while deleting a timer does not leave
|
// Test that a panic while deleting a timer does not leave
|
||||||
// the timers mutex held, deadlocking a ticker.Stop in a defer.
|
// the timers mutex held, deadlocking a ticker.Stop in a defer.
|
||||||
func TestIssue5745(t *testing.T) {
|
func TestIssue5745(t *testing.T) {
|
||||||
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm" {
|
|
||||||
t.Skipf("skipping on %s/%s, see issue 10043", runtime.GOOS, runtime.GOARCH)
|
|
||||||
}
|
|
||||||
|
|
||||||
ticker := NewTicker(Hour)
|
ticker := NewTicker(Hour)
|
||||||
defer func() {
|
defer func() {
|
||||||
// would deadlock here before the fix due to
|
// would deadlock here before the fix due to
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
// Copyright 2015 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
// +build darwin
|
|
||||||
// +build arm arm64
|
|
||||||
|
|
||||||
package time
|
|
||||||
|
|
||||||
import "syscall"
|
|
||||||
|
|
||||||
var zoneFile string
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
wd, err := syscall.Getwd()
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// The working directory at initialization is the root of the
|
|
||||||
// app bundle: "/private/.../bundlename.app". That's where we
|
|
||||||
// keep zoneinfo.zip.
|
|
||||||
zoneFile = wd + "/zoneinfo.zip"
|
|
||||||
}
|
|
||||||
|
|
||||||
func forceZipFileForTesting(zipOnly bool) {
|
|
||||||
// On iOS we only have the zip file.
|
|
||||||
}
|
|
||||||
|
|
||||||
func initTestingZone() {
|
|
||||||
z, err := loadZoneFile(zoneFile, "America/Los_Angeles")
|
|
||||||
if err != nil {
|
|
||||||
panic("cannot load America/Los_Angeles for testing: " + err.Error())
|
|
||||||
}
|
|
||||||
z.name = "Local"
|
|
||||||
localLoc = *z
|
|
||||||
}
|
|
||||||
|
|
||||||
func initLocal() {
|
|
||||||
// TODO(crawshaw): [NSTimeZone localTimeZone]
|
|
||||||
localLoc = *UTC
|
|
||||||
}
|
|
||||||
|
|
||||||
func loadLocation(name string) (*Location, error) {
|
|
||||||
z, err := loadZoneFile(zoneFile, name)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
z.name = name
|
|
||||||
return z, nil
|
|
||||||
}
|
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build darwin,!arm,!arm64 dragonfly freebsd linux nacl netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
|
||||||
|
|
||||||
// Parse "zoneinfo" time zone file.
|
// Parse "zoneinfo" time zone file.
|
||||||
// This is a fairly standard file format used on OS X, Linux, BSD, Sun, and others.
|
// This is a fairly standard file format used on OS X, Linux, BSD, Sun, and others.
|
||||||
|
Loading…
Reference in New Issue
Block a user