Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

ctime_r - thread-safe conversion of date and time to string

&pagelevel(4)&pagelevel

Syntax

#include <time.h>

char *ctime_r(const time_t *clock, char *buf);

char *ctime64_r(const tim64e_t *clock, char *buf);

Description

ctime_r() and ctime_r() convert the time specified by clock to the same format as ctime() ctime64()and writes the result to the data area pointed to by buf (at least 26 bytes).

Return val.

Pointer to the string pointed to by buf,


if successful.

Null pointer

if an error occurs. errno is set to indicate the error.

See also

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