Documentation ¶
Index ¶
- Constants
- func CurrTimeStamp() int64
- func CurrTimeStampString() string
- func CurrTimeStr() string
- func CurrTimestampInMilli() int64
- func CurrTimestampInMilliString() string
- func ParseTime(timeStr string) (int64, error)
- func RandByTime(t *time.Time) int64
- func TimeGeneralLayout() string
- func TimeStampToStr(timestamp int64) string
- func TimeStr2MillsecondUnix(timeStr string) int64
- func TimeStr2SecondUnix(timeStr string) int64
Constants ¶
View Source
const ( TimeFmtStrYear = "2006" TimeFmtStrMonth = "01" TimeFmtStrDay = "02" TimeFmtStrHour = "15" TimeFmtStrMinute = "04" TimeFmtStrSecond = "05" )
time format alias
Variables ¶
This section is empty.
Functions ¶
func CurrTimeStampString ¶
func CurrTimeStampString() string
CurrTimeStampString return current timestamp string
func CurrTimeStr ¶
func CurrTimeStr() string
CurrTimeStr get general layout time str: YYYY-MM-DD HH:ii:ss
func CurrTimestampInMilli ¶
func CurrTimestampInMilli() int64
CurrTimestampInMilli get current timestamp in millisecond
func CurrTimestampInMilliString ¶
func CurrTimestampInMilliString() string
CurrTimestampInMilliString return 1441007112776 in millisecond
func TimeGeneralLayout ¶
func TimeGeneralLayout() string
TimeGeneralLayout general time layout: YYYY-MM-DD HH:ii:ss
func TimeStampToStr ¶
TimeStampToStr convert timestamp to string.
func TimeStr2MillsecondUnix ¶
TimeStr2MillsecondUnix general time string to millisecond
func TimeStr2SecondUnix ¶
TimeStr2SecondUnix time str to timestamp seconds
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.