tzdb

package module
v0.0.0-...-e819834 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 10 Imported by: 3

README

tzdb

List of tz database time zones form Ecletus using Go Time

Documentation

Index

Constants

View Source
const ZonesZipFile = "golib/time/zoneinfo.zip"

Variables

View Source
var Sys = NewLocationGetterFunc(func() *time.Location {
	return time.Local
})

Functions

This section is empty.

Types

type DB

type DB struct {
	ByName map[string]*time.Location
	All    []*time.Location
	// contains filtered or unexported fields
}
var (
	Db DB
)

func (*DB) Labels

func (d *DB) Labels() (s []string)

func (*DB) Load

func (d *DB) Load(fs assetfsapi.Interface) (err error)

func (*DB) Names

func (d *DB) Names() (names []string)

func (*DB) Pair

func (d *DB) Pair() (pairs [][]string)

func (*DB) Strings

func (d *DB) Strings() (s []string)

func (*DB) Structs

func (d *DB) Structs() (pairs []struct {
	Value, Label string
	Loc          *time.Location
})

type Location

type Location interface {
	Location() *time.Location
}

func NewLocationGetter

func NewLocationGetter(loc *time.Location) Location

func NewLocationGetterFunc

func NewLocationGetterFunc(f func() *time.Location) Location

type LocationCity

type LocationCity string

func (LocationCity) City

func (this LocationCity) City() string

func (LocationCity) Label

func (this LocationCity) Label() string

func (LocationCity) Location

func (this LocationCity) Location() *time.Location

func (LocationCity) Region

func (this LocationCity) Region() string

func (LocationCity) String

func (this LocationCity) String() string

type LocationGetterFunc

type LocationGetterFunc func() *time.Location

func (LocationGetterFunc) Location

func (this LocationGetterFunc) Location() *time.Location

Jump to

Keyboard shortcuts

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