| // 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. |
| wd, err := syscall.Getwd() |
| // The working directory at initialization is the root of the |
| // app bundle: "/private/.../bundlename.app". That's where we |
| zoneFile = wd + "/zoneinfo.zip" |
| func forceZipFileForTesting(zipOnly bool) { |
| // On iOS we only have the zip file. |
| z, err := loadZoneFile(zoneFile, "America/Los_Angeles") |
| panic("cannot load America/Los_Angeles for testing: " + err.Error()) |
| // TODO(crawshaw): [NSTimeZone localTimeZone] |
| func loadLocation(name string) (*Location, error) { |
| z, err := loadZoneFile(zoneFile, name) |