From a33323f665601943558a910c55536fb4dfa6fae8 Mon Sep 17 00:00:00 2001 From: GQPHD Date: Tue, 1 Jun 2021 01:30:52 +0900 Subject: [PATCH] fixes #5. t.tm_mon = month; to t.tm_mon = month - 1;. it builds successfully without hickups. --- src/GPSFix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GPSFix.cpp b/src/GPSFix.cpp index 20fe275..a424ae0 100644 --- a/src/GPSFix.cpp +++ b/src/GPSFix.cpp @@ -167,7 +167,7 @@ std::string GPSTimestamp::monthName(uint32_t index){ time_t GPSTimestamp::getTime() { struct tm t = { 0 }; t.tm_year = year - 1900; // This is year-1900, so 112 = 2012 - t.tm_mon = month; // month from 0:Jan + t.tm_mon = month - 1; // month from 0:Jan t.tm_mday = day; t.tm_hour = hour; t.tm_min = min;