From 3a118fef15c51f46885d5579a5bc5b753b791f55 Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 18 Feb 2022 02:50:41 +0100 Subject: [PATCH] Update TOTP.php --- src/TOTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {