xtime

package
Version: v0.6.16 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 2 Imported by: 6

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 格式化

Source Files

Jump to

Keyboard shortcuts

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