github.com/s1s1ty/go@v0.0.0-20180207192209-104445e3140f/src/time/zoneinfo_ios.go (about)

     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.
     4  
     5  // +build darwin
     6  // +build arm arm64
     7  
     8  package time
     9  
    10  import "syscall"
    11  
    12  var zoneSources = []string{
    13  	getZipParent() + "/zoneinfo.zip",
    14  }
    15  
    16  func getZipParent() string {
    17  	wd, err := syscall.Getwd()
    18  	if err != nil {
    19  		return "/XXXNOEXIST"
    20  	}
    21  
    22  	// The working directory at initialization is the root of the
    23  	// app bundle: "/private/.../bundlename.app". That's where we
    24  	// keep zoneinfo.zip.
    25  	return wd
    26  }
    27  
    28  func initLocal() {
    29  	// TODO(crawshaw): [NSTimeZone localTimeZone]
    30  	localLoc = *UTC
    31  }