You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
237 B
14 lines
237 B
2 years ago
|
package util
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
// GetNowYmdHms 获取当前datetime
|
||
|
func GetNowYmdHms() string {
|
||
|
return time.Now().Format("2006-01-02 15:04:05")
|
||
|
}
|
||
|
|
||
|
// GetNowUnix 获取当前时间戳
|
||
|
func GetNowUnix() int64 {
|
||
|
return time.Now().Unix()
|
||
|
}
|