In the function:
void RTCC_TimeGet( struct tm Time )
from the harmony library (plib_rtcc.c)
The tm_year field according to the standard is:
int tm_year; /the years since 1900/
However, in this function this variable is set to an exact value of year 0.
So if the standard is followed with this function we get errors.
It would only be necessary to change line 175:
....
//tmp += 2000U; / This RTC is designed for a range of 0 to 99 years. You have to add 2000 to that. */
tmp += 100U; //To adjust the structure to standard time it is necessary to add 2000 and subtract 1900 from this field. That is, add 100.
Time->tm_year = (int)tmp;
....
In the function: void RTCC_TimeGet( struct tm Time ) from the harmony library (plib_rtcc.c) The tm_year field according to the standard is: int tm_year; /the years since 1900/ However, in this function this variable is set to an exact value of year 0. So if the standard is followed with this function we get errors. It would only be necessary to change line 175: .... //tmp += 2000U; / This RTC is designed for a range of 0 to 99 years. You have to add 2000 to that. */ tmp += 100U; //To adjust the structure to standard time it is necessary to add 2000 and subtract 1900 from this field. That is, add 100. Time->tm_year = (int)tmp; ....