jsoninfo: nmealib now sets year and month correctly
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 20 Jul 2016 11:47:10 +0000 (13:47 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 20 Jul 2016 13:14:07 +0000 (15:14 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/jsoninfo/src/olsrd_jsoninfo.c

index 4e3e495..5817d2d 100644 (file)
@@ -902,8 +902,8 @@ void ipc_print_pud_position(struct autobuf *abuf) {
   /* utc */
   if (nmeaInfoIsPresentAll(txGpsInfo->txPosition.nmeaInfo.present, NMEALIB_PRESENT_UTCDATE)) {
     abuf_json_mark_object(&json_session, true, false, abuf, "date");
-    abuf_json_int(&json_session, abuf, "year", txGpsInfo->txPosition.nmeaInfo.utc.year + 1900);
-    abuf_json_int(&json_session, abuf, "month", txGpsInfo->txPosition.nmeaInfo.utc.mon + 1);
+    abuf_json_int(&json_session, abuf, "year", txGpsInfo->txPosition.nmeaInfo.utc.year);
+    abuf_json_int(&json_session, abuf, "month", txGpsInfo->txPosition.nmeaInfo.utc.mon);
     abuf_json_int(&json_session, abuf, "day", txGpsInfo->txPosition.nmeaInfo.utc.day);
     abuf_json_mark_object(&json_session, false, false, abuf, NULL);
   }