Improve the time checking. #392
This commit is contained in:
parent
da16bf54a3
commit
6effa53997
1 changed files with 5 additions and 5 deletions
|
|
@ -2700,15 +2700,15 @@ class APIController extends Controller implements LoggedController
|
|||
|
||||
// TODO: remove the time check after ECQ. This will then always return true
|
||||
// get current time
|
||||
$current_datetime = new DateTime();
|
||||
$current_datetime = new DateTime();
|
||||
//$current_datetime = DateTime::createFromFormat('Y-m-d H:i', '2020-04-30 13:34');
|
||||
|
||||
// get the hour
|
||||
$current_time = $current_datetime->format('g:i A');
|
||||
$hour = $current_datetime->format('G');
|
||||
|
||||
$time_array = explode(':', $current_time);
|
||||
$hour = $time_array[0];
|
||||
error_log($hour);
|
||||
|
||||
if (($hour < 8) && ($hour > 5))
|
||||
if (($hour < 8) || ($hour > 17))
|
||||
$schedule_choice = false;
|
||||
|
||||
$data = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue