timezone

package
v0.29.3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

timezone is a static list of timezones. It is incomplete as of now. Eventually it will be autogenerated using the approach as shown https://stackoverflow.com/questions/40120056/get-a-list-of-valid-time-zones-in-go

https://stackoverflow.com/questions/61186388/user-friendly-time-zone-names-corresponding-to-iana-names

Index

Constants

View Source
const (
	TimezoneAmericaChicago    = "America/Chicago"
	TimezoneAmericaLosAngeles = "America/Los_Angeles"
)
View Source
const (
	DefaultZoneDirsString = "/usr/share/zoneinfo/,/usr/share/lib/zoneinfo/,/usr/lib/locale/TZ/"
	PortableZones         = `` /* 10049-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func DefaultZoneDirs added in v0.26.8

func DefaultZoneDirs() []string

func ZoneOffsetSeconds added in v0.26.8

func ZoneOffsetSeconds(dt time.Time, ianaTimeZoneName string) (int, error)

ZoneOffsetSeconds is used like ZoneOffsetSeconds(time.Now(), "America/New_York")

func ZonesPortable added in v0.26.8

func ZonesPortable() []string

func ZonesSystem added in v0.26.8

func ZonesSystem(zoneDirs []string) []string

GetZones treturns a list of timezones.

Types

This section is empty.

Directories

Path Synopsis
examples
build_constants
main this code was sourced from Stack Overflow here: https://stackoverflow.com/a/40130882/1908967
main this code was sourced from Stack Overflow here: https://stackoverflow.com/a/40130882/1908967

Jump to

Keyboard shortcuts

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