1
0
mirror of https://github.com/golang/go synced 2024-09-25 13:20:13 -06:00

time: return ENOENT from androidLoadTzinfoFromTzdata if zone not found

This makes Android consistent with the change in CL 121877.

Updates #20969

Change-Id: I1f114556fd1d4654c8e4e6a59513bddd5dc3d1a0
Reviewed-on: https://go-review.googlesource.com/135416
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Elias Naur <elias.naur@gmail.com>
This commit is contained in:
Ian Lance Taylor 2018-09-14 15:11:51 -07:00
parent 0670b28bf0
commit fb061b5e11

View File

@ -11,6 +11,7 @@ package time
import (
"errors"
"runtime"
"syscall"
)
var zoneSources = []string{
@ -75,5 +76,5 @@ func androidLoadTzinfoFromTzdata(file, name string) ([]byte, error) {
}
return buf, nil
}
return nil, errors.New("cannot find " + name + " in tzdata file " + file)
return nil, syscall.ENOENT
}