mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-04-12 02:02:25 +02: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:
parent
6181abee14
commit
9704cf7ae1
@ -428,7 +428,7 @@ if ($sessionCounter == $seenSessionCounter && $sessionUse > $seenSessionUse)
|
|||||||
$tsDelta = $tsDiff * TS_SEC;
|
$tsDelta = $tsDiff * TS_SEC;
|
||||||
|
|
||||||
// check the real time
|
// check the real time
|
||||||
$lastTime = strtotime($ad['accessed']);
|
$lastTime = $localParams['modified'];
|
||||||
$now = time();
|
$now = time();
|
||||||
$elapsed = $now - $lastTime;
|
$elapsed = $now - $lastTime;
|
||||||
$deviation = abs($elapsed - $tsDelta);
|
$deviation = abs($elapsed - $tsDelta);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user