From fb061b5e116d1e176039f0948221e8a107a401cd Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 14 Sep 2018 15:11:51 -0700 Subject: [PATCH] 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 --- src/time/zoneinfo_android.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } -- 2.50.0