Pushing a bunch of hosuekeeper updates

This commit is contained in:
Matt Burchett
2018-11-14 03:51:03 +00:00
parent 254933c2f0
commit e9280412a7
7 changed files with 204 additions and 39 deletions

11
pkg/util/epoch.go Normal file
View 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
}