diff --git a/webapp/controller/OtherController.class.php b/webapp/controller/OtherController.class.php index f774f8eb..971e37f4 100644 --- a/webapp/controller/OtherController.class.php +++ b/webapp/controller/OtherController.class.php @@ -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