From ef8bca720fe5ab6f42157ca5894b3ae5b7f80025 Mon Sep 17 00:00:00 2001
From: asund <andrewsund@andrewsund.net>
Date: Mon, 25 Sep 2017 11:34:35 -0700
Subject: [PATCH] clarity of century use in struct tm

---
 minmea.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/minmea.c b/minmea.c
index 3b228dd..8905d82 100644
--- a/minmea.c
+++ b/minmea.c
@@ -619,10 +619,10 @@ int minmea_gettime(struct timespec *ts, const struct minmea_date *date, const st
 
     struct tm tm;
     memset(&tm, 0, sizeof(tm));
-    tm.tm_year = date->year % 100;  // ZDA parser stores 4 digit year, filter centuries here so raw information is still preserved for user.
+    tm.tm_year = date->year % 100;  // ZDA parser stores 4 digit year, filter centuries here so raw information is preserved in struct minmea_sentence_zda if user needs it.
     if (tm.tm_year < 80)    // GPS epoch begins 1980, assume a year range of 1980 to 2079 for the library.
     {
-        tm.tm_year += 2000 - 1900;
+        tm.tm_year = 2000 + tm.tm_year - 1900;
     }
     tm.tm_mon = date->month - 1;
     tm.tm_mday = date->day;