mirror of git://gcc.gnu.org/git/gcc.git
time: Look for zoneinfo files in Solaris directory.
From-SVN: r169380
This commit is contained in:
parent
c9610865d0
commit
43e4710147
|
|
@ -18,6 +18,7 @@ import (
|
||||||
const (
|
const (
|
||||||
headerSize = 4 + 16 + 4*7
|
headerSize = 4 + 16 + 4*7
|
||||||
zoneDir = "/usr/share/zoneinfo/"
|
zoneDir = "/usr/share/zoneinfo/"
|
||||||
|
zoneDir2 = "/usr/share/lib/zoneinfo/"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Simple I/O interface to binary blob of data.
|
// Simple I/O interface to binary blob of data.
|
||||||
|
|
@ -216,7 +217,11 @@ func setupZone() {
|
||||||
case err == os.ENOENV:
|
case err == os.ENOENV:
|
||||||
zones, _ = readinfofile("/etc/localtime")
|
zones, _ = readinfofile("/etc/localtime")
|
||||||
case len(tz) > 0:
|
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:
|
case len(tz) == 0:
|
||||||
// do nothing: use UTC
|
// do nothing: use UTC
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue