QDate - wrong year [Solved]
-
How should the Qt know which epoch this year is?
-
You can add 100 years for example... if you sure what only years from 21-31 century will be used...
@
QDate fixDate = QDate::fromString(QString("270912"), "ddMMyy").addYears (100);
@ -
I don't really know... but if there is no other option to get full sized year...
Or you can do like it is an real-time date... and use epoch from current date... -
Wait a second does gps nmea returns a year? I was thinking it returns only the utc time and not the date?
-
I have better idea!
in year 1912 there was no GPS at all, and of cause no nmea format...bq. 1973 Decision to develop a satellite navigation system based on the systems TRANSIT, TIMATION und 621B of the U.S. Air Force and the U.S. Navy.
You will be on the safe side to convert all dates after 1970 into 19__ format and all dates below into 20__ format...