This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C129ENCPDT: Can't update the RTC time

Part Number: TM4C129ENCPDT

Hey there, 

I'm fetching the time from pool.ntp.org, and it's used to update the time of the RTC, but due to some unknown issues, the updation is not working properly now. 
This is how I'm updating the RTC time, 

void setRtcUnixTime(time_t uTime)
{
   struct tm nTime, *pTime;
   pTime = localtime(&uTime); 
   nTime = *pTime;
   HibernateCalendarSet(&nTime); 
}

and the latest time is fecthed by,

time_t getUnixTime(void)
{
time_t timestamp = 0;
HibernateCalendarGet(&timeData);
timeData.tm_year -= 70;
timestamp = mktime(&timeData); 
return timestamp;
}

The time fetched from NTP server is of proper format, but the value that is read right after setting the time to RTC is a day behind the actual value. Time in the RTC is matched with the actual time, but the day is lagging by 24 hours. RTC is functioning properly and HH:MM:SS is updated properly with respect to GMT, but it's failing to "set a new time and follow that". The time syncing and getUnixTime() was working fine across all the boards, but now even the older firmware versions are showing the same issue, which were all working fine. Any help on the issue is really appreciated.

Thanks, 
Febin.