public function latest_update_time($return_type = NULL)
 {
     $update_time = update_model::get_latest_local_timestamp($return_type);
     // echo "<pre>";print_r($update_time);exit();
     // echo $update_time;
     // $update_time = json_encode($update_time,JSON_PRETTY_PRINT);
     echo json_encode($update_time);
     // $update_time = json_decode($update_time,true);
     // print_r($update_time);
 }
Example #2
0
 public function system_update_status()
 {
     $local_data = update_model::get_latest_local_timestamp();
     // echo "<pre>";print_r($local_data);exit;
     $server_data = $this->get_server_update_data();
     $server_time = $server_data[0]['added_on'];
     $local_time = $local_data[0]['added_on'];
     if (strtotime($server_time) > strtotime($local_time)) {
         // echo "Update Required";
         $status = 1;
     } else {
         // echo "No update required";
         $status = 0;
     }
     // echo "<pre>";print_r($local_time);exit;
     return $status;
 }