1
0
mirror of https://github.com/golang/go synced 2024-09-29 12:14:28 -06:00

time: clean up list in doc

This commit is contained in:
Leigh McCulloch 2021-09-28 19:18:01 -07:00 committed by GitHub
parent 3904b941c6
commit 4a9b04d2dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -631,15 +631,13 @@ var zoneinfoOnce sync.Once
// Otherwise, the name is taken to be a location name corresponding to a file
// in the IANA Time Zone database, such as "America/New_York".
//
// The time zone database needed by LoadLocation may not be
// present on all systems, especially non-Unix systems.
// LoadLocation looks in the directory or uncompressed zip file
// named by the ZONEINFO environment variable, if any, then looks in
// known installation locations on Unix systems,
// and looks in $GOROOT/lib/time/zoneinfo.zip.
// If the time/tzdata package is imported, LoadLocation will load
// the time zone database from that package if it could not be
// loaded from any other location.
// LoadLocation looks for the IANA Time Zone database in the following
// locations in order:
//
// - the directory or uncompressed zip file named by the ZONEINFO environment variable
// - pn a Unix system, the system standard installation location
// - $GOROOT/lib/time/zoneinfo.zip
// - the time/tzdata package, if it was imported
func LoadLocation(name string) (*Location, error) {
if name == "" || name == "UTC" {
return UTC, nil