safec
3.6.0
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "safe_lib.h"
Macros | |
#define | _GNU_SOURCE |
Functions | |
EXPORT struct tm * | localtime_s (const time_t *restrict timer, struct tm *restrict dest) |
The localtime_s function converts the given time since epoch to a calendar time, expressed in the current timezone in the struct tm format. More... | |
#define _GNU_SOURCE |
EXPORT struct tm* localtime_s | ( | const time_t *restrict | timer, |
struct tm *restrict | dest | ||
) |
The localtime_s
function converts the given time since epoch to a calendar time, expressed in the current timezone in the struct tm format.
The result is copied into the user-provided tm struct.
[in] | timer | pointer to a epoch (long, seconds since 1970) |
[out] | dest | pointer to a user-provided struct tm. |
POSIX requires that this function sets errno to EOVERFLOW if it fails because the argument is too large. POSIX defines a thread-safe alternative localtime_r, which is similar to the C11 function localtime_s, except that it does not check the validity of its input parameters.
This function is available under windows with a different API, reversed argument order, and is not available with safeclib.