From 73396f69235ec8556b77212e34d96cede2d6d77d Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期五, 14 八月 2020 15:10:29 +0800 Subject: [PATCH] add log --- controllers/restriction.go | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/controllers/restriction.go b/controllers/restriction.go index da08c1d..9a3d8d7 100644 --- a/controllers/restriction.go +++ b/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 } -- Gitblit v1.8.0