1
0
mirror of https://github.com/golang/go synced 2024-09-29 18:24:29 -06:00

time: reference -tags=timetzdata in testing panic

This will spare anyone who hits it having to search for the workaround.

Change-Id: Iff0d449212f2675ac78e30ae5ffc8efb4d924088
Reviewed-on: https://go-review.googlesource.com/c/go/+/334611
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2021-07-14 13:21:11 -07:00
parent 025308fe08
commit 5a4b9f9494

View File

@ -12,7 +12,7 @@ func init() {
func initTestingZone() {
z, err := loadLocation("America/Los_Angeles", zoneSources[len(zoneSources)-1:])
if err != nil {
panic("cannot load America/Los_Angeles for testing: " + err.Error())
panic("cannot load America/Los_Angeles for testing: " + err.Error() + "; you may want to use -tags=timetzdata")
}
z.name = "Local"
localLoc = *z