Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

localtime_r - convert date and time to string (thread-safe)

&pagelevel(4)&pagelevel

Syntax

#include <time.h>

struct tm *localtime_r(const time_t *clock, struct tm *result); 

Description

localtime_r() converts the time value pointed to by clock to exactly the same time format
as localtime() and writes the result in the memory area pointed to by result (with at least
26 bytes).

Return val.

Pointer to a string pointed to by result



if successful.

Null pointer

if an error occurs.

See also

asctime(), asctime_r(), ctime(), ctime_r(), localtime(), time().