tzlocal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Unlicense Imports: 5 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvTZ

func EnvTZ() (string, bool)

EnvTZ will return the TZ env value if it is set, go will revert any invalid timezone to UTC

func LocalTZ

func LocalTZ() (string, error)

LocalTZ will run `/etc/localtime` and get the timezone from the resulting value `/usr/share/zoneinfo/America/New_York`

func RuntimeTZ

func RuntimeTZ() (string, error)

RuntimeTZ get the full timezone name of the local machine

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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