NAME

ctime - convert a time value to date and time string

SYNOPSIS

#include "zkTime.h"

char *ctime(const time_t *clock);

DESCRIPTION

The ctime() function converts the time pointed to by clock to local time in the form of a string. It is equivalent to:

asctime(localtime(clock))

The asctime(), ctime(), gmtime() and localtime() functions return values in one of two static objects: a broken-down time structure and an array of char. Execution of any of the functions may overwrite the information returned in either of these objects by any of the other functions.

The ctime() interface need not be reentrant.

RETURN VALUE

The ctime() function returns the pointer returned by asctime() with that broken-down time as an argument.

ERRORS

No errors are defined.

APPLICATION USAGE

Values for the broken-down time structure can be obtained by calling gmtime() or localtime(). This interface is included for compatibility with older implementations, and does not support localised date and time formats. Applications should use the strftime() interface to achieve maximum portability.