update: fix calcResetDayByYearExpiredAt

This commit is contained in:
v2board 2023-01-29 19:04:20 +08:00
parent 2c9f45a193
commit 7f25fb674f

View File

@ -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);
}