Skip to content

Commit

Permalink
Fix parsing of time stamps with time zone in GPX file
Browse files Browse the repository at this point in the history
  • Loading branch information
mastervanleeuwen committed Oct 25, 2024
1 parent 3201115 commit e03e220
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/com_jtg/helpers/gpsClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,8 @@ public function giveTimestamp($date)
$time_tmp_date_year = $time_tmp_date[0];
$time_tmp_date_month = $time_tmp_date[1];
$time_tmp_date_day = $time_tmp_date[2];
$time_tmp_time = explode(':', str_replace("Z", "", $date[1]));
$time_tmp_time = preg_split('/[Z+-]+/', $date[1]);
$time_tmp_time = explode(':', $time_tmp_time[0]);
$time_tmp_time_hour = $time_tmp_time[0];
$time_tmp_time_minute = $time_tmp_time[1];
$time_tmp_time_sec = (int) round($time_tmp_time[2], 0);
Expand Down

0 comments on commit e03e220

Please sign in to comment.