diff --git a/htdocs/api/class/api_status.class.php b/htdocs/api/class/api_status.class.php index 32c2b6f801e..f6cf09e289f 100644 --- a/htdocs/api/class/api_status.class.php +++ b/htdocs/api/class/api_status.class.php @@ -51,15 +51,15 @@ class Status extends DolibarrApi 'success' => array( 'code' => 200, 'dolibarr_version' => DOL_VERSION, - 'access_locked' => (!getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED') ? '0' : getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')), + 'access_locked' => getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED', '0'), ), ); - if ( $dolibarr_main_prod == '0' ) { + if (empty($dolibarr_main_prod)) { $response['success']['environment'] = 'non-production'; $response['success']['timestamp_now_utc'] = dol_now(); $response['success']['timestamp_php_tz'] = date_default_timezone_get(); - $response['success']['date_tz'] = dol_print_date(dol_now('gmt'), '%d-%m-%Y %H:%M:%S'); + $response['success']['date_tz'] = dol_print_date(dol_now('gmt'), 'standard'); } return $response;