Retro68/gcc/libgo/go/time/zoneinfo_ios.go

32 lines
645 B
Go
Raw Normal View History

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