controllers/restriction.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
controllers/restriction.go
@@ -78,12 +78,12 @@ } func isBetween(st string, et string, nowDate string, nowTime time.Time) bool { fmt.Println("st:", st, "et:", et, "nowDate:", nowDate) if st == nowDate || et == nowDate { return true } else { st, e1 := time.Parse(st, "2006-01-02") et, e2 := time.Parse(et, "2006-01-02") fmt.Println("e1:", e1, "e2:", e2, st.Before(nowTime), et.After(nowTime)) if e1 == nil && e2 == nil && st.Before(nowTime) && et.After(nowTime) { return true }