tz

package
v0.0.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package tz implements the functions, types, and interfaces for the module.

Package tz implements the functions, types, and interfaces for the module.

Package tz implements the functions, types, and interfaces for the module.

Package tz implements the functions, types, and interfaces for the module.

Package tz implements the functions, types, and interfaces for the module.

Index

Constants

View Source
const (
	OffsetCountryName = 0
	OffsetCountryCode = 1
)
View Source
const (
	OffsetZoneName         = 0
	OffsetZoneCountryCode  = 1
	OffsetZoneAbbreviation = 2
	OffsetZoneTimeStart    = 3
	OffsetZoneGmtOffset    = 4
	OffsetZoneDst          = 5
)

Variables

View Source
var (
	Countries []Country
	TimeZones []TimeZone
)

Functions

func GenerateJSON

func GenerateJSON() error

func Location

func Location() string

Types

type Country

type Country struct {
	CountryName string `json:"country_name"`
	CountryCode string `json:"country_code"`
}

Country country_name,country_code

func CountriesFromCSV

func CountriesFromCSV(filePath string) ([]Country, error)

type TimeZone

type TimeZone struct {
	ZoneName     string `json:"zone_name"`
	ZoneID       string `json:"zone_id"`
	CountryCode  string `json:"country_code"`
	Abbreviation string `json:"abbreviation"`
	TimeStart    int64  `json:"time_start"`
	GmtOffset    int64  `json:"gmt_offset"`
	Dst          int64  `json:"dst"` // 1 or 0 means DST
}

TimeZone zone_name,country_code,abbreviation,time_start,gmt_offset,dst

func TimeZonesFromCSV

func TimeZonesFromCSV(filePath string) ([]TimeZone, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL