Cleanup of sample data and date/time parsing

This commit is contained in:
Nabeel Shahzad
2018-05-08 20:59:19 -05:00
parent 4fc30ec4bc
commit bd7bd7e802
3 changed files with 29 additions and 531 deletions

View File

@@ -421,6 +421,14 @@ class PirepController extends Controller
$position['pirep_id'] = $id;
$position['type'] = AcarsType::FLIGHT_PATH;
if(array_key_exists('sim_time', $position)) {
$position['sim_time'] = Carbon::createFromTimeString($position['sim_time']);
}
if (array_key_exists('created_at', $position)) {
$position['created_at'] = Carbon::createFromTimeString($position['created_at']);
}
$update = Acars::create($position);
$update->save();