1 // Copyright 2015 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
15 var zoneSources
= []string{
16 getZoneRoot() + "/zoneinfo.zip",
19 func getZoneRoot() string {
20 // The working directory at initialization is the root of the
21 // app bundle: "/private/.../bundlename.app". That's where we
22 // keep zoneinfo.zip for tethered iOS builds.
23 // For self-hosted iOS builds, the zoneinfo.zip is in GOROOT.
24 roots
:= []string{runtime
.GOROOT() + "/lib/time"}
25 wd
, err
:= syscall
.Getwd()
27 roots
= append(roots
, wd
)
29 for _
, r
:= range roots
{
31 fd
, err
:= syscall
.Open(r
, syscall
.O_RDONLY
, 0)
35 defer syscall
.Close(fd
)
36 if err
:= syscall
.Fstat(fd
, &st
); err
== nil {
44 // TODO(crawshaw): [NSTimeZone localTimeZone]