|
|
#include <time.h>char *ctime(const time_t *time);
The ctime( ) function returns a pointer to a string of the form
day month year hours:minutes:seconds year\n\0
given a pointer to the calendar time. The calendar time is often obtained through a call to time( ).
The buffer used by ctime( ) to hold the formatted output string is a statically allocated character array and is overwritten each time the function is called. If you want to save the contents of the string, it is necessary to copy it elsewhere.
Related functions are localtime( ), gmtime( ), time( ), and asctime( ).
|
|