Procházet zdrojové kódy

Truncate to seconds the startTime to simplify tests.

Mariano Cano před 7 roky
rodič
revize
2fb77b8a4d
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      authority/authority.go

+ 2 - 1
authority/authority.go

@@ -103,7 +103,8 @@ func (a *Authority) init() error {
 		}
 	}
 
-	a.startTime = time.Now()
+	// JWT numeric dates are seconds.
+	a.startTime = time.Now().Truncate(time.Second)
 	// Set flag indicating that initialization has been completed, and should
 	// not be repeated.
 	a.initOnce = true