From 758ff64c69e34965f8af5b2d6ffd65e8d7ab2150 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Mon, 14 Feb 2011 13:23:51 +0100 Subject: Imported Upstream version 2011-02-01.1 --- src/pkg/time/zoneinfo_unix.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/pkg/time/zoneinfo_unix.go') 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 } -- cgit v1.2.3