diff --git a/types/timestamp.go b/types/timestamp.go index bfcd250..b60f8f4 100644 --- a/types/timestamp.go +++ b/types/timestamp.go @@ -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)