fixed 0-timestamp for gpx imports. uPosition::add() will fail if timestamp equals 0

This commit is contained in:
rahra 2018-09-18 16:28:27 +02:00 committed by Bartek Fabiszewski
parent 9786e9d25b
commit f4edfe0e33

View File

@ -108,7 +108,7 @@ foreach ($gpx->trk as $trk) {
$track->delete();
uUtils::exitWithError($lang["iparsefailure"]);
}
$time = isset($point->time) ? strtotime($point->time) : 0;
$time = isset($point->time) ? strtotime($point->time) : 1;
$altitude = isset($point->ele) ? (double) $point->ele : NULL;
$speed = NULL;
$bearing = NULL;