Hi,
I'm writing code for an MSP430F5418 using CCE 4.2.1.00004.
I'm trying to use gmtime in time.h to convert the unix time coming out of my RTC to the struct tm format, the results coming out of gmtime seem to have an offset of 1 day and 6 hours. For example if I feed in the value 0 to gmtime i get
*(brokenTime) = {...}
tm_sec = 0
tm_min = 0
tm_hour = 6
tm_mday = 1
tm_mon = 0
tm_year = 0
tm_wday = 1
tm_yday = 0
tm_isdst = -1
Where of course it should be all 0's, this offset seems to apply to any value if I feed in 10 I get,
*(brokenTime) = {...}
tm_sec = 10
tm_min = 0
tm_hour = 6
tm_mday = 1
tm_mon = 0
tm_year = 0
tm_wday = 1
tm_yday = 0
tm_isdst = -1
and so on...
I'm guessing this is something I'm doing wrong, but I would be grateful for any help?
Regards,
Ben