pud: nmealib now sets year and month correctly
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 20 Jul 2016 11:46:32 +0000 (13:46 +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/pud/src/receiver.c

index 2258e8e..3870f89 100644 (file)
@@ -418,8 +418,8 @@ static bool writePositionOutputFile(void) {
   }
 
   /* utc */
-  fprintf(fp, "%s%s=%04d\n", PUD_POSOUT_FILE_PARAM_PREFIX, "YEAR", nmeaInfo->utc.year + 1900);
-  fprintf(fp, "%s%s=%02d\n", PUD_POSOUT_FILE_PARAM_PREFIX, "MONTH", nmeaInfo->utc.mon + 1);
+  fprintf(fp, "%s%s=%04d\n", PUD_POSOUT_FILE_PARAM_PREFIX, "YEAR", nmeaInfo->utc.year);
+  fprintf(fp, "%s%s=%02d\n", PUD_POSOUT_FILE_PARAM_PREFIX, "MONTH", nmeaInfo->utc.mon);
   fprintf(fp, "%s%s=%02d\n", PUD_POSOUT_FILE_PARAM_PREFIX, "DAY", nmeaInfo->utc.day);
   fprintf(fp, "%s%s=%02d\n", PUD_POSOUT_FILE_PARAM_PREFIX, "HOUR", nmeaInfo->utc.hour);
   fprintf(fp, "%s%s=%02d\n", PUD_POSOUT_FILE_PARAM_PREFIX, "MINUTE", nmeaInfo->utc.min);