From f4edfe0e33e5b83c443df149653b05e0bf0d4e62 Mon Sep 17 00:00:00 2001 From: rahra Date: Tue, 18 Sep 2018 16:28:27 +0200 Subject: [PATCH] fixed 0-timestamp for gpx imports. uPosition::add() will fail if timestamp equals 0 --- utils/import.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/import.php b/utils/import.php index 15cbda0..49629e3 100755 --- a/utils/import.php +++ b/utils/import.php @@ -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; @@ -142,4 +142,4 @@ foreach ($gpx->trk as $trk) { // return last track id and tracks count uUtils::exitWithSuccess([ "trackid" => $trackId, "trackcnt" => $trackCnt ]); -?> \ No newline at end of file +?>