Allow importing tracks with no timestamp (will set to 0)

This commit is contained in:
Bartek Fabiszewski 2017-08-25 13:05:48 +02:00
parent b7e8844175
commit 66db684819

View File

@ -96,7 +96,7 @@ foreach ($gpx->trk as $trk) {
foreach($trk->trkseg as $segment) { foreach($trk->trkseg as $segment) {
foreach($segment->trkpt as $point) { foreach($segment->trkpt as $point) {
$time = isset($point->time) ? strtotime($point->time) : NULL; $time = isset($point->time) ? strtotime($point->time) : 0;
$altitude = isset($point->ele) ? (double) $point->ele : NULL; $altitude = isset($point->ele) ? (double) $point->ele : NULL;
$speed = NULL; $speed = NULL;
$bearing = NULL; $bearing = NULL;