Update TOTP.php

This commit is contained in:
flash 2022-02-18 02:50:41 +01:00 committed by GitHub
parent ddadb1d068
commit 3a118fef15

View file

@ -18,7 +18,7 @@ class TOTP {
public static function timecode(?int $timestamp = null, int $interval = self::INTERVAL): int {
$timestamp = $timestamp ?? time();
return ($timestamp * 1000) / ($interval * 1000);
return (int)(($timestamp * 1000) / ($interval * 1000));
}
public function generate(?int $timestamp = null): string {