utilsTime

package
v0.0.0-...-7ec6a99 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FormatDatetime        = "2006-01-02 15:04:05"
	FormatDatetimeCompact = "20060102150405"
	FormatDay             = "2006-01-02"
	FormatDatetCompact    = "20060102"
	FormatTime            = "15:04:05"

	FormatUTC  = "2006-01-02T15:04:05Z"
	FormatUTC1 = "2006-01-02T15:04:05"
	FormatUTC2 = "2006-01-02T15:04Z"

	FormatISO8601 = "2006-01-02T15:04:05.999-07:00"
)

Variables

This section is empty.

Functions

func FormatDalay

func FormatDalay(ts time.Time) string

func FormatUnix

func FormatUnix(unixTime interface{}, format string) string

格式化 unix 时间戳

func ParseLong

func ParseLong(s string) (tDst time.Time)

func ParseShort

func ParseShort(s string) (tDst time.Time)

func ParseUTC

func ParseUTC(utc string, format string) (local time.Time, err error)

func SleepHour

func SleepHour()

func SleepRandMilli

func SleepRandMilli(max int, seed int64)

func SleepRandSecond

func SleepRandSecond(max int, seed int64)

func SleepSecond

func SleepSecond(sleep int)

func WeekdayEn2Cn

func WeekdayEn2Cn(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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