diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php index dbfb8614..ff146a0d 100644 --- a/application/controllers/Contesting.php +++ b/application/controllers/Contesting.php @@ -190,7 +190,9 @@ class Contesting extends CI_Controller { header('Content-Type: application/json'); if ($result && $result->num_rows()) { $timeb4=$result->row()->b4; - echo json_encode(array('message' => 'Worked '.$timeb4.' before')); + $custom_date_format = $this->session->userdata('user_date_format'); + $abstimeb4=date($custom_date_format, strtotime($result->row()->COL_TIME_OFF)).' '.date('H:i',strtotime($result->row()->COL_TIME_OFF)); + echo json_encode(array('message' => 'Worked at '.$abstimeb4.' ('.$timeb4.') before')); } return; } diff --git a/application/models/Contesting_model.php b/application/models/Contesting_model.php index d92a1b20..ce2f4823 100644 --- a/application/models/Contesting_model.php +++ b/application/models/Contesting_model.php @@ -220,7 +220,7 @@ class Contesting_model extends CI_Model { $date = DateTime::createFromFormat('d-m-Y H:i:s', $qsoarray[0]); $date = $date->format('Y-m-d H:i:s'); - $this->db->select('timediff(UTC_TIMESTAMP(),col_time_on) b4'); + $this->db->select('timediff(UTC_TIMESTAMP(),col_time_off) b4, COL_TIME_OFF'); $this->db->where('STATION_ID', $station_id); $this->db->where('COL_CALL', xss_clean($call)); $this->db->where("COL_BAND", xss_clean($band));