|
|
@ -31,6 +31,17 @@ func GetTodayStartTimeStamp() int64 { |
|
|
|
return reserveTime.Unix() |
|
|
|
} |
|
|
|
|
|
|
|
// 获取当天结束时间戳
|
|
|
|
func GetTodayEndTimeStamp() int64 { |
|
|
|
|
|
|
|
var reserveTime time.Time |
|
|
|
loc, _ := time.LoadLocation("Asia/Shanghai") |
|
|
|
|
|
|
|
date := time.Now().Format("2006-01-02") |
|
|
|
reserveTime, _ = time.ParseInLocation("2006-01-02 15:04:05", date+" 23:59:59", loc) |
|
|
|
return reserveTime.Unix() |
|
|
|
} |
|
|
|
|
|
|
|
// 获取本周开始时间戳
|
|
|
|
func GetWeekStartTimeStamp() int64 { |
|
|
|
|
|
|
|