1
0
mirror of https://github.com/golang/go synced 2024-10-04 09:31:22 -06:00
go/src/pkg/time/export_test.go
Russ Cox a508381e89 time: correct path to time zone zip file on Unix
Most Unix systems have their own time zone data,
so we almost never get far enough in the list to
discover that we cannot fall back to the zip file.
Adjust testing to exercise the final fallback.

Plan 9 and Windows were already correct
(and are the main users of the zip file).

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/19280043
2013-10-29 17:11:51 -04:00

25 lines
466 B
Go

// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package time
import (
"sync"
)
func ResetLocalOnceForTest() {
localOnce = sync.Once{}
localLoc = Location{}
}
func ForceUSPacificForTesting() {
ResetLocalOnceForTest()
localOnce.Do(initTestingZone)
}
var (
ForceZipFileForTesting = forceZipFileForTesting
ParseTimeZone = parseTimeZone
)