diff --git a/core/api.go b/core/api.go index be5fffad..6a653909 100644 --- a/core/api.go +++ b/core/api.go @@ -224,7 +224,7 @@ func authorizeApp(ar *api.Request) (interface{}, error) { Title: "An app requests access to the Portmaster", Message: "Allow " + appName + " (" + proc.Profile().LocalProfile().Name + ") to query and modify the Portmaster?\n\nBinary: " + proc.Path, ShowOnSystem: true, - Expires: time.Now().Add(time.Minute).UnixNano(), + Expires: time.Now().Add(time.Minute).Unix(), AvailableActions: []*notifications.Action{ { ID: "allow", diff --git a/resolver/ipinfo.go b/resolver/ipinfo.go index 58bfc98a..6c1eed31 100644 --- a/resolver/ipinfo.go +++ b/resolver/ipinfo.go @@ -4,6 +4,7 @@ import ( "fmt" "strings" "sync" + "time" "github.com/safing/portbase/database" "github.com/safing/portbase/database/record" @@ -170,7 +171,7 @@ func (info *IPInfo) Save() error { } // Calculate and set cache expiry. - var expires int64 = 86400 // Minimum TTL of one day. + expires := time.Now().Unix() + 86400 // Minimum TTL of one day. for _, rd := range info.ResolvedDomains { if rd.Expires > expires { expires = rd.Expires