Skip to content

Commit fb061b5

Browse files
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Elias Naur <[email protected]>
1 parent 0670b28 commit fb061b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/time/zoneinfo_android.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ package time
1111
import (
1212
"errors"
1313
"runtime"
14+
"syscall"
1415
)
1516

1617
var zoneSources = []string{
@@ -75,5 +76,5 @@ func androidLoadTzinfoFromTzdata(file, name string) ([]byte, error) {
7576
}
7677
return buf, nil
7778
}
78-
return nil, errors.New("cannot find " + name + " in tzdata file " + file)
79+
return nil, syscall.ENOENT
7980
}

0 commit comments

Comments
 (0)