1
0
mirror of https://github.com/golang/go synced 2024-10-01 18:38:34 -06:00
go/src/time/zoneinfo_ios.go

36 lines
707 B
Go
Raw Normal View History

// 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 (
"runtime"
"syscall"
)
var zoneSources = []string{
getZipParent() + "/zoneinfo.zip",
runtime.GOROOT() + "/lib/time/zoneinfo.zip",
}
func getZipParent() string {
wd, err := syscall.Getwd()
if err != nil {
return "/XXXNOEXIST"
}
// The working directory at initialization is the root of the
// app bundle: "/private/.../bundlename.app". That's where we
// keep zoneinfo.zip.
return wd
}
func initLocal() {
// TODO(crawshaw): [NSTimeZone localTimeZone]
localLoc = *UTC
}