tzlocal

package
v0.0.0-...-889a765 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Code generated by tzlocal/update_tzmapping.go DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var IANAtoWinTZ = map[string]string{}/* 554 elements not displayed */

IANAtoWinTZ maps time zone names used by IANA to those used by Windows

View Source
var WinTZtoIANA = map[string]string{}/* 139 elements not displayed */

WinTZtoIANA maps time zone names used by Windows to those used by IANA

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