Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Locations = []Timezone{}/* 584 elements not displayed */
Locations is a list of all IANA timezone locations and country codes.
Functions ¶
func Offset ¶
Offset returns the abbreviated name of the zone of l (such as "CET") and its offset in seconds east of UTC. The location should be valid IANA timezone location.
Example ¶
zone, offset, _ := Offset("Europe/Helsinki")
fmt.Println(zone, offset)
Output: EEST 10800
func ValidLocation ¶
ValidLocation returns true if the given string can be found as a timezone location in the timezone.Locations array.
Example ¶
fmt.Println(ValidLocation("Europe/Helsinki"))
Output: true
Types ¶
type Timezone ¶
Timezone holds data gathered from CSV files on http://timezonedb.com/download.
Click to show internal directories.
Click to hide internal directories.