Bugfix: wrong date conversion in gpsnmea plugin
authorOlivier Delbeke <olivier.delbeke@awtce.be>
Wed, 8 Apr 2015 08:40:39 +0000 (10:40 +0200)
committerOlivier Delbeke <olivier.delbeke@gmail.com>
Wed, 15 Apr 2015 18:14:50 +0000 (20:14 +0200)
plugins/gpsnmea/gpsnmea.cpp

index 7663e77..ec01f90 100644 (file)
@@ -303,7 +303,7 @@ void Location::parseTime(string h, string m, string s, string dd, string mm, str
                t.tm_min = boost::lexical_cast<int>(m);
                t.tm_sec = boost::lexical_cast<int>(s);
                t.tm_mday = boost::lexical_cast<int>(dd);
-               t.tm_mon = boost::lexical_cast<int>(mm);
+               t.tm_mon = boost::lexical_cast<int>(mm) - 1;
                t.tm_year = boost::lexical_cast<int>(yy) + 100;
 
                time_t time = mktime(&t);