Add GetUnixNanoNow

tags/v1.5.0 v1.5.0
Stanly 3 years ago
parent 8caad09446
commit 2b63956905

@ -26,6 +26,11 @@ func GetUnixNow() Timestamp {
return Timestamp(time.Now().Unix())
}
// GetUnixNow 取得現在時間戳記
func GetUnixNanoNow() Timestamp {
return Timestamp(time.Now().UnixNano())
}
// GetUnix 嘗試取得時間戳記
func GetUnix(format, datetime string) (Timestamp, error) {
t, err := time.ParseInLocation(format, datetime, Local)

Loading…
Cancel
Save