| <html lang="en"> |
| <head> |
| <title>asctime - Untitled</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="Untitled"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="Timefns.html#Timefns" title="Timefns"> |
| <link rel="next" href="clock.html#clock" title="clock"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="asctime"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="clock.html#clock">clock</a>, |
| Up: <a rel="up" accesskey="u" href="Timefns.html#Timefns">Timefns</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">8.1 <code>asctime</code>—format time as string</h3> |
| |
| <p><a name="index-asctime-428"></a><a name="index-g_t_005fasctime_005fr-429"></a><strong>Synopsis</strong> |
| <pre class="example"> #include <time.h> |
| char *asctime(const struct tm *<var>clock</var>); |
| char *_asctime_r(const struct tm *<var>clock</var>, char *<var>buf</var>); |
| |
| </pre> |
| <p><strong>Description</strong><br> |
| Format the time value at <var>clock</var> into a string of the form |
| <pre class="smallexample"> Wed Jun 15 11:38:07 1988\n\0 |
| </pre> |
| <p>The string is generated in a static buffer; each call to <code>asctime</code> |
| overwrites the string generated by previous calls. |
| |
| <p><br> |
| <strong>Returns</strong><br> |
| A pointer to the string containing a formatted timestamp. |
| |
| <p><br> |
| <strong>Portability</strong><br> |
| ANSI C requires <code>asctime</code>. |
| |
| <p><code>asctime</code> requires no supporting OS subroutines. |
| |
| <p><br> |
| |
| </body></html> |
| |