xtime

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 2 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Duration

func Duration(str string) time.Duration

Duration ... panic if parse duration failed

func ParseInLocation added in v0.3.4

func ParseInLocation(layout, value string) (time.Time, error)

ParseInLocation parse time with location from env "TZ", if "TZ" hasn't been set then we use UTC by default.

Types

type TimeFormat

type TimeFormat string
var TS TimeFormat = "2006-01-02 15:04:05"

func (TimeFormat) Format

func (ts TimeFormat) Format(t time.Time) string

Jump to

Keyboard shortcuts

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