Private
Public Access
1
0

Return not found for more recently deleted servers, too

This commit is contained in:
2023-12-14 23:14:37 -08:00
parent 2cd4d8a35a
commit 404c64b910
3 changed files with 24 additions and 0 deletions

16
ntpdb/server.go Normal file
View File

@@ -0,0 +1,16 @@
package ntpdb
import "time"
func (s *Server) DeletionAge(dur time.Duration) bool {
if !s.DeletionOn.Valid {
return false
}
if dur > 0 {
dur = dur * -1
}
if s.DeletionOn.Time.Before(time.Now().Add(dur)) {
return true
}
return false
}