mirror of
https://github.com/v2board/v2board.git
synced 2025-06-16 14:47:48 +08:00
update: fix calcResetDayByYearExpiredAt
This commit is contained in:
@ -44,6 +44,9 @@ class UserService
|
|||||||
$md = date('m-d', $expiredAt);
|
$md = date('m-d', $expiredAt);
|
||||||
$nowYear = strtotime(date("Y-{$md}"));
|
$nowYear = strtotime(date("Y-{$md}"));
|
||||||
$nextYear = strtotime('+1 year', $nowYear);
|
$nextYear = strtotime('+1 year', $nowYear);
|
||||||
|
if ($nowYear > time()) {
|
||||||
|
return (int)(($nowYear - time()) / 86400);
|
||||||
|
}
|
||||||
return (int)(($nextYear - time()) / 86400);
|
return (int)(($nextYear - time()) / 86400);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user