summaryrefslogtreecommitdiff
path: root/utils/loc_nmea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/loc_nmea.cpp')
-rw-r--r--utils/loc_nmea.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/loc_nmea.cpp b/utils/loc_nmea.cpp
index 876620f..9ee2716 100644
--- a/utils/loc_nmea.cpp
+++ b/utils/loc_nmea.cpp
@@ -1195,7 +1195,8 @@ void loc_nmea_generate_pos(const UlpLocation &location,
(location, locationExtended, systemInfo, utcPosTimestamp);
time_t utcTime(utcPosTimestamp/1000);
- tm * pTm = gmtime(&utcTime);
+ struct tm result;
+ tm * pTm = gmtime_r(&utcTime, &result);
if (NULL == pTm) {
LOC_LOGE("gmtime failed");
return;