github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/time/zoneinfo_read.go (about) 1 // Copyright 2009 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 // Parse "zoneinfo" time zone file. 6 // This is a fairly standard file format used on OS X, Linux, BSD, Sun, and others. 7 // See tzfile(5), https://en.wikipedia.org/wiki/Zoneinfo, 8 // and ftp://munnari.oz.au/pub/oldtz/ 9 10 package time 11 12 // LoadLocationFromTZData returns a Location with the given name 13 // initialized from the IANA Time Zone database-formatted data. 14 // The data should be in the format of a standard IANA time zone file 15 // (for example, the content of /etc/localtime on Unix systems). 16 func LoadLocationFromTZData(name string, data []byte) (*Location, error)