MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / LoadExpiredLocation

Function LoadExpiredLocation

core/utils/common/time.go:33–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33func LoadExpiredLocation() *time.Location {
34 var (
35 expiredLoc *time.Location
36 expiredLocOnce sync.Once
37 )
38 expiredLocOnce.Do(func() {
39 loc, err := time.LoadLocation(LoadTimeZoneByCmd())
40 if err != nil {
41 expiredLoc = time.Local
42 return
43 }
44 expiredLoc = loc
45 })
46 if expiredLoc == nil {
47 return time.Local
48 }
49 return expiredLoc
50}

Callers

nothing calls this directly

Calls 1

LoadTimeZoneByCmdFunction · 0.70

Tested by

no test coverage detected