Commit Graph

5 Commits (mbed-os-5.5)

Author SHA1 Message Date
Russ Butler 1d59200f81 Fix mktime test DST error
Initialize all values of timeinfo in make_time_info. This prevents
the field 'tm_isdst' from getting inadvertently set to 1 causing
time to be off by 1 hour.
2017-06-11 09:48:38 +01:00
Russ Butler 4c6430ab1e Limit mktime test range for IAR
Do not test mktime or localtime past the year 1935 for IAR since this
is out of their supported range.
2017-06-11 09:48:38 +01:00
Vincent Coubard c678ac8f50 mbed_localtime: Add support of year day.
This field is needed by the LPC43XX targets.
2017-06-11 09:48:20 +01:00
Vincent Coubard 45d590669e mbed_mktime: Improve documentation for doxygen. 2017-06-11 09:48:19 +01:00
Vincent Coubard f9b9bcc343 remove usage of mktime/localtime in favor of dedicated functions.
The use of mktime was causing a fault when called in interrupt handler because on GCC it lock the mutex protecting the environment, To overcome this issue, this patch add dedicated routine to convert a time_t into a tm and vice versa.
In the process mktime has been optimized and is now an order of magnitude faster than the routines present in the C library.
2017-06-11 09:48:18 +01:00