Hi,
I have project, where I have to update the RTC (it's the hibernate module in calendar mode), but when I get the seconds via a time_t member, and convert into a tm structure, that I can use to adjust the Hibernate module via the driver library, the TM structure seems to be incorrect:
tm_sec int 43 0x20028A2C
tm_min int 4 0x20028A30
tm_hour int 14 0x20028A34
tm_mday int 19 0x20028A38
tm_mon int 11 0x20028A3C
tm_year int 44 0x20028A40
tm_wday int 2 0x20028A44
tm_yday int 353 0x20028A48
tm_isdst int -1 0x20028A4C
As you can see, eg.: the year is correct (1970 + 44 = 2014), the day also correct, today is 19th, but the month is incorrect (it tells us, that there is November instead of December). This is the code fraction, that is responsible the conversion:
u32 time;
xQueueReceive(queueHandle, &time, 0);
std::tm* t = std::localtime(&time);
Can anybody tell me, what did I wrong? Or what can I additionally to do for the correct behavioral?
Regards,
Norbert