This commit is contained in:
hujiabin 2024-07-02 17:02:31 +08:00
parent 7d925991aa
commit 46e005ce6a

View File

@ -317,14 +317,14 @@ class OtherController extends BaseAuthedController {
$temp = array(
'id' => $modeMeta['id']
);
if ($modeMeta['id'] == 1){
$dailyOpenTimeOffset = myself()->_getDaySecondsOffset(strtotime("2024-6-22 ".$modeMeta['daily_open_time']));
$dailyEndTimeOffset = myself()->_getDaySecondsOffset(strtotime("2024-6-22 ".$modeMeta['daily_end_time']));
$nowTimeOffset = myself()->_getDaySecondsOffset(myself()->_getNowTime());
$temp['daily_open_time'] = strtotime($modeMeta['daily_open_time']) ;
$temp['daily_end_time'] = strtotime($modeMeta['daily_end_time']);
$temp['state'] = $nowTimeOffset >= $dailyOpenTimeOffset && $nowTimeOffset <= $dailyEndTimeOffset ? 1 : 0;
}
array_push(
$modeList,
$temp