audit empty compare date strings
This commit is contained in:
parent
acd69803d6
commit
3a38cd0f19
1 changed files with 2 additions and 1 deletions
3
audit.go
3
audit.go
|
@ -20,6 +20,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -63,7 +64,7 @@ func doAudit(host string, filter string) bool {
|
|||
|
||||
currentTime := time.Now()
|
||||
last3Month := currentTime.AddDate(0,-3,0)
|
||||
if instance.CreatedAt < last3Month.Format("2006-01-02T15:04:05Z") {
|
||||
if strings.Compare(instance.CreatedAt, last3Month.Format("2006-01-02T15:04:05Z")) < 1 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue