Documentation ¶ Index ¶ Variables func GetAllZones() []string func IsZoneValid(zone string) bool type DSTInfo type ZoneInfo func GetZoneInfo(zone string) (*ZoneInfo, error) Constants ¶ This section is empty. Variables ¶ View Source var ( // Error, invalid timezone ErrZoneInvalid = fmt.Errorf("Invalid time zone") ) Functions ¶ func GetAllZones ¶ func GetAllZones() []string func IsZoneValid ¶ func IsZoneValid(zone string) bool Check timezone validity Types ¶ type DSTInfo ¶ type DSTInfo struct { // The timestamp of entering DST every year Enter int64 // The timestamp of leaving DST every year Leave int64 // The DST offset Offset int32 } type ZoneInfo ¶ type ZoneInfo struct { // Timezone name, ex: "Asia/Shanghai" Name string // Timezone description, ex: "上海" Desc string // Timezone offset Offset int32 DST DSTInfo } func GetZoneInfo ¶ func GetZoneInfo(zone string) (*ZoneInfo, error) Query timezone detail info by timezone Source Files ¶ View all Source files wrapper.go zone.go Click to show internal directories. Click to hide internal directories.