u 3 years ago
parent
commit
3c9fdb9297
  1. 8
      core.go

8
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
}

Loading…
Cancel
Save