Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ZoneinfoForTesting (0.16 sec)

  1. src/time/export_test.go

    )
    
    func ResetLocalOnceForTest() {
    	localOnce = sync.Once{}
    	localLoc = Location{}
    }
    
    func ForceUSPacificForTesting() {
    	ResetLocalOnceForTest()
    	localOnce.Do(initTestingZone)
    }
    
    func ZoneinfoForTesting() *string {
    	return zoneinfo
    }
    
    func ResetZoneinfoForTesting() {
    	zoneinfo = nil
    	zoneinfoOnce = sync.Once{}
    }
    
    var (
    	DisablePlatformSources = disablePlatformSources
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 19:23:32 UTC 2022
    - 4K bytes
    - Viewed (0)
  2. src/time/zoneinfo_test.go

    // license that can be found in the LICENSE file.
    
    package time_test
    
    import (
    	"errors"
    	"fmt"
    	"internal/testenv"
    	"os"
    	"reflect"
    	"testing"
    	"time"
    )
    
    func init() {
    	if time.ZoneinfoForTesting() != nil {
    		panic(fmt.Errorf("zoneinfo initialized before first LoadLocation"))
    	}
    }
    
    func TestEnvVarUsage(t *testing.T) {
    	time.ResetZoneinfoForTesting()
    
    	const testZoneinfo = "foo.zip"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 13 17:06:56 UTC 2023
    - 9.9K bytes
    - Viewed (0)
Back to top