diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-02-14 13:23:51 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-02-14 13:23:51 +0100 |
commit | 758ff64c69e34965f8af5b2d6ffd65e8d7ab2150 (patch) | |
tree | 6d6b34f8c678862fe9b56c945a7b63f68502c245 /src/pkg/time/zoneinfo_unix.go | |
parent | 3e45412327a2654a77944249962b3652e6142299 (diff) | |
download | golang-upstream/2011-02-01.1.tar.gz |
Imported Upstream version 2011-02-01.1upstream/2011-02-01.1
Diffstat (limited to 'src/pkg/time/zoneinfo_unix.go')
-rw-r--r-- | src/pkg/time/zoneinfo_unix.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pkg/time/zoneinfo_unix.go b/src/pkg/time/zoneinfo_unix.go index 26c86ab03..6685da747 100644 --- a/src/pkg/time/zoneinfo_unix.go +++ b/src/pkg/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 } |