Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrTimeGet ¶
func CurrTimeGet() string
CurrTimeGet gets current time in format like 2006-01-02 15:04:05
func StrToUnix ¶
StrToUnix converts time string of format "2016-01-11 06:12:33" to unix timestamp
Params:
- timeStr: time string
Returns:
(timestamp, err)
func TimestampSplit ¶
TimestampSplit splits a full time string in format "yyyyMMddHHmmss"(e.g., "20130411143020"), to "yyyyMMdd" and "HHmmss"
Params:
- timestamp: time string in format "yyyyMMddHHmmss"
Returns:
("yyyyMMdd", "HHmmss", error)
func UnixTimeToDateTime ¶
UnixTimeToDateTime converts from unix time to date-and-time e.g., from 13923223442(int64) to 20140611120132(int64)
Params:
- unixTime: the number of seconds elapsed since January 1, 1970 UTC.
Returns:
(datetime, error) datetime - yyyymmddhhmmss, e.g., 20140611120132 (int64)
Types ¶
This section is empty.