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>
diff --git a/src/time/zoneinfo_android.go b/src/time/zoneinfo_android.go
index 65e0975..237ff20 100644
--- a/src/time/zoneinfo_android.go
+++ b/src/time/zoneinfo_android.go
@@ -11,6 +11,7 @@
import (
"errors"
"runtime"
+ "syscall"
)
var zoneSources = []string{
@@ -75,5 +76,5 @@
}
return buf, nil
}
- return nil, errors.New("cannot find " + name + " in tzdata file " + file)
+ return nil, syscall.ENOENT
}