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, localtime64_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); 

struct tm *localtime64_r(const time64_t *clock, struct tm *result); 

Description

localtime_r() and localtime64_r() convert the time value pointed to by clock to exactly the same time format as localtime() and localtime64r() and write 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().