Truncate to seconds instead of rounding.

This commit is contained in:
Mariano Cano 2019-03-11 18:13:20 -07:00
parent b77621675c
commit 1a9e8bad74

View file

@ -131,5 +131,5 @@ func getCacheJitter(age time.Duration) time.Duration {
}
func getExpirationTime(age time.Duration) time.Time {
return time.Now().Round(time.Second).Add(age)
return time.Now().Truncate(time.Second).Add(age)
}