Convert a time_t type to a character array.
#include <time.h> char *ctime(const time_t *timer);
timer
A pointer to a value of type time_t to convert.
This function converts a time_t type to a character array with the same format as generated by asctime().
The function returns a null-terminated character array pointer containing the converted time_t value. This facility may not be available on some configurations of the EWL.
#include <time.h> #include <stdio.h> int main(void) { time_t systime; systime = time(NULL); puts(ctime(&systime)); return 0; } Output: Wed Jul 20 13:32:17 1994