xtime

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 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

TimeFormat ...

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

TS ...

func (TimeFormat) Format

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

Format 格式化

Jump to

Keyboard shortcuts

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