Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Time Representation APIs

Functions

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

Detailed Description

Function Documentation

◆ timeutil_timegm()

time_t timeutil_timegm ( const struct tm tm)

#include <zephyr/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 <zephyr/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