httpinfo: nmealib now sets year and month correctly
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 20 Jul 2016 11:47:20 +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/httpinfo/src/olsrd_httpinfo.c

index 65df14a..112435b 100644 (file)
@@ -1153,8 +1153,8 @@ static void build_pud_body(struct autobuf *abuf) {
        if (datePresent || timePresent) {
                if (datePresent) {
                        abuf_appendf(abuf, "%04d%02d%02d",
-                               txGpsInfo->txPosition.nmeaInfo.utc.year + 1900,
-                               txGpsInfo->txPosition.nmeaInfo.utc.mon + 1,
+                               txGpsInfo->txPosition.nmeaInfo.utc.year,
+                               txGpsInfo->txPosition.nmeaInfo.utc.mon,
                                txGpsInfo->txPosition.nmeaInfo.utc.day);
                }
                if (datePresent && timePresent) {