1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2024-11-29 00:24:13 +01:00

Refactor.

- avoid unnecessary strtotime() call.

- instead of:
		strtotime(date('Y-m-d H:i:s', $timestamp))

	use:
		$timestamp

	since:
		$timestamp === strtotime(date('Y-m-d H:i:s', $timestamp))
This commit is contained in:
Jean Paul Galea 2015-07-24 14:45:41 +02:00
parent 6181abee14
commit 9704cf7ae1

View File

@ -428,7 +428,7 @@ if ($sessionCounter == $seenSessionCounter && $sessionUse > $seenSessionUse)
$tsDelta = $tsDiff * TS_SEC;
// check the real time
$lastTime = strtotime($ad['accessed']);
$lastTime = $localParams['modified'];
$now = time();
$elapsed = $now - $lastTime;
$deviation = abs($elapsed - $tsDelta);