Source file src/time/export_android_test.go

     1  // Copyright 2016 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package time
     6  
     7  func ForceAndroidTzdataForTest() (undo func()) {
     8  	allowGorootSource = false
     9  	origLoadFromEmbeddedTZData := loadFromEmbeddedTZData
    10  	loadFromEmbeddedTZData = nil
    11  
    12  	return func() {
    13  		allowGorootSource = true
    14  		loadFromEmbeddedTZData = origLoadFromEmbeddedTZData
    15  	}
    16  }
    17  

View as plain text