2.15.4 ctime

Declaration:

char *ctime(const time_t *timer);

Returns a string representing the localtime based on the argument timer. This is equivalent to:

asctime(locatime(timer));

The returned string is in the following format:

DDD MMM dd hh:mm:ss YYYY

DDDDay of the week (Sun, Mon, Tue, Wed, Thu, Fri, Sat)
MMMMonth of the year (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec)
ddDay of the month (1,…,31)
hhHour (0,…,23)
mmMinute (0,…,59)
ssSecond (0,…,59)
YYYYYear

The string is terminated with a newline character and a null character. The string is always 26 characters long (including the terminating newline and null characters).

A pointer to the string is returned.