ctime.c 384 B

1234567891011121314
  1. #include <time.h>
  2. #include <sys/time.h>
  3. char * ctime (const time_t *t)
  4. {
  5. /* According to IEEE Std 1003.1-2001: The ctime() function shall
  6. * convert the time pointed to by clock, representing time in
  7. * seconds since the Epoch, to local time in the form of a string.
  8. * It shall be equivalent to: asctime(localtime(clock)) */
  9. return asctime (localtime (t));
  10. }