From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Fri, 28 Apr 2023 21:37:54 +0000 (-0600) Subject: set timespec to UTC in new skytraq code. (#1094) X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~1^2~65 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b2fc84d18589531522ded3e2e7960b705c87f04e;p=gpsbabel.git set timespec to UTC in new skytraq code. (#1094) I wish Qt would default to UTC instead of Local Time! --- diff --git a/skytraq.cc b/skytraq.cc index a228e6e65..239c18bfa 100644 --- a/skytraq.cc +++ b/skytraq.cc @@ -531,7 +531,7 @@ SkytraqBase::gpstime_to_qdatetime(int week, int sec) const int override = xstrtoi(opt_gps_utc_offset, nullptr, 10); if (override) { gps_timet -= override; - return QDateTime::fromSecsSinceEpoch(gps_timet); + return QDateTime::fromSecsSinceEpoch(gps_timet, Qt::UTC); } /* leap second compensation: */ @@ -554,7 +554,7 @@ SkytraqBase::gpstime_to_qdatetime(int week, int sec) const // Future: Consult http://maia.usno.navy.mil/ser7/tai-utc.dat // use http://www.stevegs.com/utils/jd_calc/ for Julian to UNIX sec - return QDateTime::fromSecsSinceEpoch(gps_timet); /* returns UTC time */ + return QDateTime::fromSecsSinceEpoch(gps_timet, Qt::UTC); } void