diff --git a/webapp/controller/OtherController.class.php b/webapp/controller/OtherController.class.php index 971e37f4..e0c65583 100644 --- a/webapp/controller/OtherController.class.php +++ b/webapp/controller/OtherController.class.php @@ -317,14 +317,15 @@ class OtherController extends BaseAuthedController { $temp = array( 'id' => $modeMeta['id'] ); - + if ($modeMeta['daily_open_time']){ $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