@@ -711,12 +711,12 @@ func HourFormat(hour int) string {
//数组中的小时是否结束
func TimesIsOver(times []string, hour int) (bool, time.Time, time.Time) {
- sort.Strings(times)
+ now := time.Now()
if len(times) == 0 {
- return false, nil, nil
+ return false, now, now
}
+ sort.Strings(times)
lastHour := util.IntAll(strings.Split(times[len(times)-1], ":"))
- now := time.Now()
//跨天
if lastHour == 23 && hour == 0 {
start := time.Date(now.Year(), now.Month(), now.Day()-1, 0, 0, 0, 0, time.Local)