From: Ian Lance Taylor Date: Fri, 14 Sep 2018 22:11:51 +0000 (-0700) Subject: time: return ENOENT from androidLoadTzinfoFromTzdata if zone not found X-Git-Tag: go1.12beta1~1082 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fb061b5e116d1e176039f0948221e8a107a401cd;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick Reviewed-by: Elias Naur --- diff --git a/src/time/zoneinfo_android.go b/src/time/zoneinfo_android.go index 65e0975ab0..237ff202f9 100644 --- a/src/time/zoneinfo_android.go +++ b/src/time/zoneinfo_android.go @@ -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 }