u 3 years ago
parent
commit
720ab42d3c
  1. 3
      core.go

3
core.go

@ -127,7 +127,7 @@ func isInTimeOfDay(t time.Time, ta TimeArrow) bool {
return true return true
} }
tfdate := t.Format("2006-01-02")
tfdate := t.Format("2006-01-02 15:04:05")
tmp, _ := json.Marshal(ta.TimesOnDay) tmp, _ := json.Marshal(ta.TimesOnDay)
mainKey := fmt.Sprintf("[%s][%s]", tfdate, string(tmp)) mainKey := fmt.Sprintf("[%s][%s]", tfdate, string(tmp))
@ -135,7 +135,6 @@ func isInTimeOfDay(t time.Time, ta TimeArrow) bool {
value, ok := isInTimeOfDayCacheBool.Load(mainKey) value, ok := isInTimeOfDayCacheBool.Load(mainKey)
if ok { if ok {
ret := value.(int) ret := value.(int)
if ret == 3 { if ret == 3 {
return true return true
} }

Loading…
Cancel
Save