Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / time / ctime.c
blob58826a6d86cf08ede0b54d5b2092d7dcc0e00539
1 /*
2 * ctime.c
3 * Original Author: G. Haley
4 */
6 /*
7 FUNCTION
8 <<ctime>>---convert time to local and format as string
10 INDEX
11 ctime
12 INDEX
13 ctime_r
15 SYNOPSIS
16 #include <time.h>
17 char *ctime(const time_t *<[clock]>);
18 char *ctime_r(const time_t *<[clock]>, char *<[buf]>);
20 DESCRIPTION
21 Convert the time value at <[clock]> to local time (like <<localtime>>)
22 and format it into a string of the form
23 . Wed Jun 15 11:38:07 1988\n\0
24 (like <<asctime>>).
26 RETURNS
27 A pointer to the string containing a formatted timestamp.
29 PORTABILITY
30 ANSI C requires <<ctime>>.
32 <<ctime>> requires no supporting OS subroutines.
35 #include <time.h>
37 #ifndef _REENT_ONLY
39 char *
40 ctime (const time_t * tim_p)
42 return asctime (localtime (tim_p));
45 #endif