You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mktime function used to convert the tm struct to time_t (seconds since Jan 1, 1970) assumes that the tm struct time is in local time. Hence, in the instance that the system time is not equal to UTC, the GPS time returned is shifted by the timezone in the opposite direction.
The text was updated successfully, but these errors were encountered:
I have fixed the issue in my fork by subtracting the timezone in seconds from the returned time_t in line 175 of GPSFix.cpp.
return mktime(&t) - timezone;
ckgt
changed the title
GPSTimestamp::getTime() has time shit in the opposite direction of the system time wrt UTC
GPSTimestamp::getTime() has time shift in the opposite direction of the system time wrt UTC
Nov 20, 2018
The mktime function used to convert the tm struct to time_t (seconds since Jan 1, 1970) assumes that the tm struct time is in local time. Hence, in the instance that the system time is not equal to UTC, the GPS time returned is shifted by the timezone in the opposite direction.
The text was updated successfully, but these errors were encountered: