zephyr/lib/os
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
..
CMakeLists.txt lib: os: add sys_sem data type 2019-07-24 10:12:25 -07:00
Kconfig
assert.c assert: generate oops if invoked from usermode 2019-07-20 08:29:39 -04:00
base64.c cleanup: include/: move base64.h to sys/base64.h 2019-06-27 22:55:49 -04:00
crc7_sw.c cleanup: include/: move crc.h to sys/crc.h 2019-06-27 22:55:49 -04:00
crc8_sw.c cleanup: include/: move crc.h to sys/crc.h 2019-06-27 22:55:49 -04:00
crc16_sw.c cleanup: include/: move crc.h to sys/crc.h 2019-06-27 22:55:49 -04:00
crc32_sw.c cleanup: include/: move crc.h to sys/crc.h 2019-06-27 22:55:49 -04:00
fdtable.c cleanup: include/: move misc/speculation.h to sys/speculation.h 2019-06-27 22:55:49 -04:00
hex.c kernel: lib: Add convert functions for hex strings and binary arrays 2019-07-16 12:44:18 +02:00
json.c cleanup: include/: move misc/util.h to sys/util.h 2019-06-27 22:55:49 -04:00
mempool.c mempool: significant reduction of memory waste 2019-07-16 14:21:21 -07:00
mutex.c kernel: syscalls: Whitespace fixups 2019-09-12 11:31:50 +08:00
printk.c userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
rb.c cleanup: include/: move misc/rb.h to sys/rb.h 2019-06-27 22:55:49 -04:00
ring_buffer.c cleanup: include/: move ring_buffer.h to sys/ring_buffer.h 2019-06-27 22:55:49 -04:00
sem.c lib: os: add sys_sem data type 2019-07-24 10:12:25 -07:00
thread_entry.c lib: os: remove dead code 2019-06-18 09:08:01 -04:00
timeutil.c lib/timeutil: avoid implementation-defined behavior 2019-09-19 20:49:51 -04:00
work_q.c