Hi,
I just found out that the gmtime and localtime produce incorrect date based on the time_t value. The 1404337303 value stands for Wed Jul 2 21:41:43 2014.
The following code snippet:
time_t rawtime = 1404337303;
struct tm * timeinfo;
timeinfo = gmtime(&rawtime);
printf("===Current local time and date: %s", asctime(timeinfo));
produces incorrect date output in CCSv6:
===Current local time and date: Mon Jul 3 03:41:43 1944
while in the GCC it is:
==Current local time and date: Wed Jul 2 21:41:43 2014
Is there any workaround on this apart from not using time.h?
Best Regards,
tml