Pushing a bunch of hosuekeeper updates
This commit is contained in:
11
pkg/util/epoch.go
Normal file
11
pkg/util/epoch.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package util
|
||||
|
||||
import "time"
|
||||
|
||||
func SubtractedEpoch(days int) int64 {
|
||||
now := time.Now()
|
||||
unix := now.Unix()
|
||||
seconds := int64(days * 86400)
|
||||
epoch := int64(unix - seconds)
|
||||
return epoch
|
||||
}
|
Reference in New Issue
Block a user