Index of Section 3 Manual Pages
| Interix / SUA | ctime.3 | Interix / SUA |
ctime(3) ctime(3)
ctime()
NAME
ctime(), ctime_r() - transform binary date and time value to ASCII
SYNOPSIS
#include
#include
char * ctime (const time_t *clock)
char * ctime_r (const time_t *clock, char *buf)
DESCRIPTION
The function ctime(3) function takes as an argument a time value
representing the time in seconds since the Epoch (00:00:00 UTC, January 1,
1970; see time(2)).
The ctime(3) function adjusts the time value for the current time zone and
returns a pointer to a 26-character string of the form:
Thu Nov 24 18:22:48 1986\n\0
All the fields have constant width.
The reentrant ctime_r(3) function converts the calendar time referenced by
clock to local time in exactly the same form as ctime(), puts the string
into the array identified by buf (which must be at least 26 bytes in
size), and returns buf.
SEE ALSO
date(1)
asctime(3)
difftime(3)
getenv(3)
gmtime(3)
localtime(3)
mktime(3)
time(2)
USAGE NOTES
The ctime_r function is thread safe. The ctime function is not thread
safe.
None of these functions are async-signal safe.