Commit 66416c00 authored by David Crawshaw's avatar David Crawshaw

misc/ios: more predictable zoneinfo.zip location

See golang.org/cl/6511.

Change-Id: I2145a42877ed6b78400f29c2ef18969870dab5c3
Reviewed-on: https://go-review.googlesource.com/6512Reviewed-by: default avatarHyang-Ah Hana Kim <hyangah@gmail.com>
parent f46e51a2
...@@ -406,10 +406,17 @@ func copyLocalData(dstbase string) (pkgpath string, err error) { ...@@ -406,10 +406,17 @@ func copyLocalData(dstbase string) (pkgpath string, err error) {
} }
// Copy timezone file. // Copy timezone file.
//
// Typical apps have the zoneinfo.zip in the root of their app bundle,
// read by the time package as the working directory at initialization.
// As we move the working directory to the GOROOT pkg directory, we
// install the zoneinfo.zip file in the pkgpath.
if underGoRoot { if underGoRoot {
dst := filepath.Join(dstbase, "lib", "time") err := cp(
os.MkdirAll(dst, 0755) filepath.Join(dstbase, pkgpath),
if err := cp(dst, filepath.Join(cwd, "lib", "time", "zoneinfo.zip")); err != nil { filepath.Join(cwd, "lib", "time", "zoneinfo.zip"),
)
if err != nil {
return "", err return "", err
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment