Explorar el Código

Truncate to seconds instead of rounding.

Mariano Cano hace 7 años
padre
commit
1a9e8bad74
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      authority/provisioner/keystore.go

+ 1 - 1
authority/provisioner/keystore.go

@@ -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)
 }