- GetCurDate
This commit is contained in:
@@ -88,6 +88,12 @@ func GetCurTimeStr() string {
|
||||
return Time2Str(time.Now())
|
||||
}
|
||||
|
||||
func GetCurDate() time.Time {
|
||||
now := time.Now()
|
||||
year, month, day := now.Date()
|
||||
return time.Date(year, month, day, 0, 0, 0, 0, now.Location())
|
||||
}
|
||||
|
||||
// timestamp is in second
|
||||
func GetCurTimestamp() int64 {
|
||||
return time.Now().Unix()
|
||||
|
||||
Reference in New Issue
Block a user