time

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MulanPSL-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DateFormat = define.DateFormat
View Source
var TimeFormat = define.TimeFormat
View Source
var TimeFormatStr = define.TimeFormatStr

Functions

func DateToUnix

func DateToUnix(date string) int64

DateToUnix 日期转时间戳

func GetNowDate

func GetNowDate() string

GetNowDate 获取当前日期

func GetNowTime

func GetNowTime() string

GetNowTime 获取当前时间

func GetNowTimeUnix

func GetNowTimeUnix() int64

GetNowTimeUnix 获取当前时间戳

func GetNowTimeUnixMilli

func GetNowTimeUnixMilli() int64

GetNowTimeUnixMilli 获取当前时间戳(毫秒)

func GetNowTimeUnixNano

func GetNowTimeUnixNano() int64

GetNowTimeUnixNano 获取当前时间戳(纳秒)

func GetNowTimeUnsigned

func GetNowTimeUnsigned() string

GetNowTimeUnsigned 获取当前时间

func GetTimeUnix

func GetTimeUnix(year, month, day, hour, min, sec int) int64

GetTimeUnix 获取指定时间戳

func GetTimeUnixByDate

func GetTimeUnixByDate(date string) int64

GetTimeUnixByDate 获取指定时间戳

func GetTimeUnixMilli

func GetTimeUnixMilli(year, month, day, hour, min, sec int) int64

GetTimeUnixMilli 获取指定时间戳(毫秒)

func GetTimeUnixMilliByDate

func GetTimeUnixMilliByDate(date string) int64

GetTimeUnixMilliByDate 获取指定时间戳(毫秒)

func GetTimeUnixNano

func GetTimeUnixNano(year, month, day, hour, min, sec int) int64

GetTimeUnixNano 获取指定时间戳(纳秒)

func GetTimeUnixNanoByDate

func GetTimeUnixNanoByDate(date string) int64

GetTimeUnixNanoByDate 获取指定时间戳(纳秒)

func JsonlTimeToString

func JsonlTimeToString(t jsonl.Time) string

func StringToJsonlTime

func StringToJsonlTime(str string) jsonl.Time

func StringToTime

func StringToTime(str string) time.Time

StringToTime string转time.Time

func TimeToString

func TimeToString(t time.Time) string

TimeToString time.Time转string

func UnixToDate

func UnixToDate(timestamp int64) string

UnixToDate 时间戳转日期

func UnixToDateMilli

func UnixToDateMilli(timestamp int64) string

UnixToDateMilli 时间戳(毫秒)转日期

func UnixToDateNano

func UnixToDateNano(timestamp int64) string

UnixToDateNano 时间戳(纳秒)转日期

Types

This section is empty.

Jump to

Keyboard shortcuts

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