localtime, localtime_r, localtime_s
From cppreference.com
| Defined in header <time.h>
|
||
| (1) | ||
| (2) | (since C23) | |
| (3) | (since C11) | |
1) Converts given time since epoch (a time_t value pointed to by timer) into calendar time, expressed in local time, in the
struct tm format. The result is stored in static storage and a pointer to that static storage is returned.2) Same as (1), except that the function uses user-provided storage buf for the result.
3) Same as (1), except that the function uses user-provided storage buf for the result and that the following errors are detected at runtime and call the currently installed constraint handler function:
- timer or buf is a null pointer
- As with all bounds-checked functions,
localtime_sis only guaranteed to be available if __STDC_LIB_EXT1__ is defined by the implementation and if the user defines __STDC_WANT_LIB_EXT1__ to the integer constant 1 before including <time.h>.
Contents |
[edit] Parameters
| timer | - | pointer to a |