diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-01-29 00:07:56 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-01-29 00:07:56 +0000 |
commit | 43e47101473e16f7acf72b771a4b7f139fce3536 (patch) | |
tree | ba167c225c11f5810f7a3408df6034a307111d90 /libgo/go/time/zoneinfo_unix.go | |
parent | c9610865d0858df3dfaa4d89359658fd34d2256d (diff) | |
download | gcc-43e47101473e16f7acf72b771a4b7f139fce3536.zip gcc-43e47101473e16f7acf72b771a4b7f139fce3536.tar.gz gcc-43e47101473e16f7acf72b771a4b7f139fce3536.tar.bz2 |
time: Look for zoneinfo files in Solaris directory.
From-SVN: r169380
Diffstat (limited to 'libgo/go/time/zoneinfo_unix.go')
-rw-r--r-- | libgo/go/time/zoneinfo_unix.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libgo/go/time/zoneinfo_unix.go b/libgo/go/time/zoneinfo_unix.go index 26c86ab..6685da7 100644 --- a/libgo/go/time/zoneinfo_unix.go +++ b/libgo/go/time/zoneinfo_unix.go @@ -18,6 +18,7 @@ import ( const ( headerSize = 4 + 16 + 4*7 zoneDir = "/usr/share/zoneinfo/" + zoneDir2 = "/usr/share/lib/zoneinfo/" ) // Simple I/O interface to binary blob of data. @@ -216,7 +217,11 @@ func setupZone() { case err == os.ENOENV: zones, _ = readinfofile("/etc/localtime") case len(tz) > 0: - zones, _ = readinfofile(zoneDir + tz) + var ok bool + zones, ok = readinfofile(zoneDir + tz) + if !ok { + zones, _ = readinfofile(zoneDir2 + tz) + } case len(tz) == 0: // do nothing: use UTC } |