|
@ -19,3 +19,14 @@ func FormatDate(str string) string { |
|
|
} |
|
|
} |
|
|
return time.Unix(date, 0).Format("2006-01-02") |
|
|
return time.Unix(date, 0).Format("2006-01-02") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//获取当天开始时间戳
|
|
|
|
|
|
func GetTodayStartTimeStamp() int64{ |
|
|
|
|
|
|
|
|
|
|
|
var reserveTime time.Time |
|
|
|
|
|
loc, _ := time.LoadLocation("Asia/Shanghai") |
|
|
|
|
|
|
|
|
|
|
|
date := time.Now().Format("2006-01-02") |
|
|
|
|
|
reserveTime,_ = time.ParseInLocation("2006-01-02",date,loc) |
|
|
|
|
|
return reserveTime.Unix() |
|
|
|
|
|
} |