diff --git a/app/Services/UserService.php b/app/Services/UserService.php index 300be780..e3631579 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -44,6 +44,9 @@ class UserService $md = date('m-d', $expiredAt); $nowYear = strtotime(date("Y-{$md}")); $nextYear = strtotime('+1 year', $nowYear); + if ($nowYear > time()) { + return (int)(($nowYear - time()) / 86400); + } return (int)(($nextYear - time()) / 86400); }