diff --git a/src/TOTP.php b/src/TOTP.php index 8a1309df..8ee4b26a 100644 --- a/src/TOTP.php +++ b/src/TOTP.php @@ -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 {