From 2b77ad0e1f407903d85c3b7bdaae0022c4ec9bc3 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期二, 08 九月 2020 14:54:00 +0800
Subject: [PATCH] fix push bug
---
controllers/restriction.go | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/controllers/restriction.go b/controllers/restriction.go
index da08c1d..6df5716 100644
--- a/controllers/restriction.go
+++ b/controllers/restriction.go
@@ -78,12 +78,11 @@
}
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")
+ st, e1 := time.Parse("2006-01-02", st)
+ et, e2 := time.Parse("2006-01-02", et)
if e1 == nil && e2 == nil && st.Before(nowTime) && et.After(nowTime) {
return true
}
--
Gitblit v1.8.0