timezone

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadLocationByAbbreviation

func LoadLocationByAbbreviation(tzAbbr, tzName string) (*time.Location, error)

LoadLocationByAbbreviation returns a `*time.Location` given a timezone abbreviation and name. For example: ("PST", "Pacific Standard Time"). If the abbreviation only represents one timezone the timezone name can be omitted. An error is returned if more than one location is present. This is a wrapper for `github.com/tkuchiki/go-timezone` which defines the timezone abbreviation and names.

func LoadLocationsByAbbreviation

func LoadLocationsByAbbreviation(tzAbbr, tzName string) []*time.Location

LoadLocationsByAbbreviation loads all the matching locations by timezone abbreviation and name. Errors are returned as an empty slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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