Преглед на файлове

Truncate to seconds the startTime to simplify tests.

Mariano Cano преди 7 години
родител
ревизия
2fb77b8a4d
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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
 	// Set flag indicating that initialization has been completed, and should
 	// not be repeated.
 	// not be repeated.
 	a.initOnce = true
 	a.initOnce = true