timezone

package
v0.40.5 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: MIT Imports: 5 Imported by: 1

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

func DefaultZoneDirs() []string

func ZoneOffsetSeconds

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

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

func ZonesPortable

func ZonesPortable() []string

func ZonesSystem

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