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 month of year field in $GPRMC sentences is indexed 1-12. This is also how it it is stored in the month class member of GPSTimestamp. In getTime(), however mktime() is called, which expects months be 0-11.
This results in the timestamp returned by getTime being off by one month.
I found this too! Thank you @hicklin
But your build has error and cannot build without edition. 'timezone' identifier in 'getTime' func comes out of nowhere. Maybe you have missing commit or something.
Activity
[-]GPSTimestamp getTime() is Off by one month[/-][+]GPSTimestamp getTime() is Off by One Month[/+]hicklin commentedon Aug 31, 2018
I have fixed this in my local copy by changing line 170 in src/GPSFix.cpp from
t.tm_mon = month;tot.tm_mon = month - 1;.sikbrad commentedon May 31, 2021
I found this too! Thank you @hicklin
But your build has error and cannot build without edition. 'timezone' identifier in 'getTime' func comes out of nowhere. Maybe you have missing commit or something.
fixes ckgt#5. t.tm_mon = month; to t.tm_mon = month - 1;. it builds s…
Fixed getTime() behind ahead by one month. Addresses issue ckgt#5