fix checking in after zero

This commit is contained in:
printempw 2016-09-27 22:32:15 +08:00
parent af95ef11d6
commit 03fbf61cf8

View File

@ -195,8 +195,8 @@ class User
$zero_timestamp_today = strtotime(date('Y-m-d',time()));
$zero_timestamp_tomorrow = strtotime(date('Y-m-d',strtotime('+1 day')));
if (Option::get('sign_after_zero')) {
$remaining_time = ($zero_timestamp_tomorrow - $last_sign_timestamp) / 3600;
if (Option::get('sign_after_zero') == "1") {
$remaining_time = ($zero_timestamp_tomorrow - time()) / 3600;
return $return_remaining_time ? round($remaining_time) : ($last_sign_timestamp <= $zero_timestamp_today);
} else {
$remaining_time = ($last_sign_timestamp + Option::get('sign_gap_time') * 3600 - time()) / 3600;