zephyr/lib
Peter A. Bigot 55ace13c32 lib/timeutil: avoid implementation-defined behavior
The algorithm for converting broken-down civil time to seconds in the
POSIX epoch time scale would produce undefined behavior on a toolchain
that uses a 32-bit time_t in cases where the referenced time could not
be represented exactly.

However, there are use cases in Zephyr for civil time conversions
outside the 32-bit representable range of 1901-12-13T20:45:52Z through
2038-01-19T03:14:07Z inclusive.

Add new API that specifically returns a 64-bit signed seconds count, and
revise the existing API to detect out-of-range values and convert them
to a diagnosible error.

Closes #18465

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-09-19 20:49:51 -04:00
..
cmsis_rtos_v1 cleanup: include/: move atomic.h to sys/atomic.h 2019-06-27 22:55:49 -04:00
cmsis_rtos_v2 CMSIS v2: Work around time unit confusion 2019-07-02 22:52:29 -04:00
gui include/lvgl: rearrange for standard use of extern "C" 2019-08-13 18:00:31 +02:00
libc libc/minimal/assert: conditionalize static_assert macro 2019-09-19 09:37:42 -05:00
os lib/timeutil: avoid implementation-defined behavior 2019-09-19 20:49:51 -04:00
posix posix: pthread: pthread_mutex_timedlock should accept absolute deadline 2019-08-27 17:50:48 -04:00
updatehub cleanup: include/: move misc/reboot.h to power/reboot.h 2019-06-27 22:55:49 -04:00
CMakeLists.txt
Kconfig