| <html lang="en"> |
| <head> |
| <title>gmtime - 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="prev" href="difftime.html#difftime" title="difftime"> |
| <link rel="next" href="localtime.html#localtime" title="localtime"> |
| <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="gmtime"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="localtime.html#localtime">localtime</a>, |
| Previous: <a rel="previous" accesskey="p" href="difftime.html#difftime">difftime</a>, |
| Up: <a rel="up" accesskey="u" href="Timefns.html#Timefns">Timefns</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">8.5 <code>gmtime</code>—convert time to UTC traditional form</h3> |
| |
| <p><a name="index-gmtime-434"></a><a name="index-gmtime_005fr-435"></a><strong>Synopsis</strong> |
| <pre class="example"> #include <time.h> |
| struct tm *gmtime(const time_t *<var>clock</var>); |
| struct tm *gmtime_r(const time_t *<var>clock</var>, struct tm *<var>res</var>); |
| |
| </pre> |
| <p><strong>Description</strong><br> |
| <code>gmtime</code> takes the time at <var>clock</var> representing the number |
| of elapsed seconds since 00:00:00 on January 1, 1970, Universal |
| Coordinated Time (UTC, also known in some countries as GMT, |
| Greenwich Mean time) and converts it to a <code>struct tm</code> |
| representation. |
| |
| <p><code>gmtime</code> constructs the traditional time representation in static |
| storage; each call to <code>gmtime</code> or <code>localtime</code> will overwrite the |
| information generated by previous calls to either function. |
| |
| <p><br> |
| <strong>Returns</strong><br> |
| A pointer to the traditional time representation (<code>struct tm</code>). |
| |
| <p><br> |
| <strong>Portability</strong><br> |
| ANSI C requires <code>gmtime</code>. |
| |
| <p><code>gmtime</code> requires no supporting OS subroutines. |
| |
| <p><br> |
| |
| </body></html> |
| |