From 3c9fdb92971025dd6aa9175274a56b1adee9b3bd Mon Sep 17 00:00:00 2001 From: u Date: Tue, 24 Aug 2021 15:40:38 +0800 Subject: [PATCH] fix --- core.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core.go b/core.go index fc3cbdd..2d39ac1 100644 --- a/core.go +++ b/core.go @@ -136,10 +136,10 @@ func isInTimeOfDay(t time.Time, ta TimeArrow) bool { if ok { ret, ok := value.(int) if ok { - if ret == 1 { + if ret == 3 { return true } - if ret == 2 { + if ret == 4 { return false } } @@ -201,11 +201,11 @@ func isInTimeOfDay(t time.Time, ta TimeArrow) bool { } if (t.After(startTime) || t.Equal(startTime)) && t.Before(endTime) { - isInTimeOfDayCacheBool.Store(mainKey, 1) + isInTimeOfDayCacheBool.Store(mainKey, 3) return true } } - isInTimeOfDayCacheBool.Store(mainKey, 2) + isInTimeOfDayCacheBool.Store(mainKey, 4) return false }