Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi:
I would like to find out the documentation for
mktime()function used by mbed.According to http://www.cplusplus.com/reference/ctime/mktime/,
mktime()returns-1if it could not convert broken down time to seconds. E.g., 31st Feb 2013.struct tm Clock; Clock.tm_year = 2013; Clock.tm_mon = 1; Clock tm_mday = 31; time_t sec = mktime(&Clock); if (sec == -1) printf("Error in clock setting\n"); else set_time(sec);Could not work as
time_tis an unsigned value from the error message. Any comment? Thank