Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
Time Representation APIs

Functions

int64_t timeutil_timegm64 (const struct tm *tm)
 Convert broken-down time to a POSIX epoch offset in seconds. More...
 
time_t timeutil_timegm (const struct tm *tm)
 Convert broken-down time to a POSIX epoch offset in seconds. More...
 

Detailed Description

Function Documentation

◆ timeutil_timegm()

time_t timeutil_timegm ( const struct tm tm)

#include <include/sys/timeutil.h>

Convert broken-down time to a POSIX epoch offset in seconds.

Parameters
tmpointer to broken down time.
Returns
the corresponding time in the POSIX epoch time scale. If the time cannot be represented then (time_t)-1 is returned and errno is set to ERANGE`.
See also
http://man7.org/linux/man-pages/man3/timegm.3.html

◆ timeutil_timegm64()

int64_t timeutil_timegm64 ( const struct tm tm)

#include <include/sys/timeutil.h>

Convert broken-down time to a POSIX epoch offset in seconds.

Parameters
tmpointer to broken down time.
Returns
the corresponding time in the POSIX epoch time scale.
See also
http://man7.org/linux/man-pages/man3/timegm.3.html