Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 8e87fca2f49595adc16d9aa519a6edad > files > 247

systemtap-1.6-1.fc14.x86_64.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>function::ctime</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="SystemTap Tapset Reference Manual"><link rel="up" href="ctime.stp.html" title="Chapter&#160;4.&#160;Time utility functions"><link rel="prev" href="ctime.stp.html" title="Chapter&#160;4.&#160;Time utility functions"><link rel="next" href="API-tz-gmtoff.html" title="function::tz_gmtoff"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>function::ctime</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ctime.stp.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;4.&#160;Time utility functions</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-tz-gmtoff.html">Next</a></td></tr></table><hr></div><div class="refentry" title="function::ctime"><a name="API-ctime"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>function::ctime &#8212; 
  Convert seconds since epoch into human readable date/time string
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><pre class="programlisting">
    ctime:string(epochsecs:long)
</pre></div><div class="refsect1" title="Arguments"><a name="id556200"></a><h2>Arguments</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>epochsecs</code></em></span></dt><dd><p>
     Number of seconds since epoch (as returned by <code class="function">gettimeofday_s</code>)
    </p></dd></dl></div></div><div class="refsect1" title="Description"><a name="id556231"></a><h2>Description</h2><p>
   Takes an argument of seconds since the epoch as returned by
   <code class="function">gettimeofday_s</code>. Returns a string of the form
   </p><p>

   <span class="quote">&#8220;<span class="quote">Wed Jun 30 21:49:08 1993</span>&#8221;</span>
   </p><p>

   The string will always be exactly 24 characters. If the time would
   be unreasonable far in the past (before what can be represented
   with a 32 bit offset in seconds from the epoch) the returned string
   will be <span class="quote">&#8220;<span class="quote">a long, long time ago...</span>&#8221;</span>. If the time would be
   unreasonable far in the future the returned string will be <span class="quote">&#8220;<span class="quote">far far
   in the future...</span>&#8221;</span> (both these strings are also 24 characters wide).
   </p><p>

   Note that the epoch (zero) corresponds to
   </p><p>

   <span class="quote">&#8220;<span class="quote">Thu Jan  1 00:00:00 1970</span>&#8221;</span>
   </p><p>

   The earliest full date given by ctime, corresponding to epochsecs
   -2147483648 is <span class="quote">&#8220;<span class="quote">Fri Dec 13 20:45:52 1901</span>&#8221;</span>. The latest full date
   given by ctime, corresponding to epochsecs 2147483647 is
   <span class="quote">&#8220;<span class="quote">Tue Jan 19 03:14:07 2038</span>&#8221;</span>.
   </p><p>

   The abbreviations for the days of the week are &#8216;Sun&#8217;, &#8216;Mon&#8217;, &#8216;Tue&#8217;,
   &#8216;Wed&#8217;, &#8216;Thu&#8217;, &#8216;Fri&#8217;, and &#8216;Sat&#8217;.  The abbreviations for the months
   are &#8216;Jan&#8217;, &#8216;Feb&#8217;, &#8216;Mar&#8217;, &#8216;Apr&#8217;, &#8216;May&#8217;, &#8216;Jun&#8217;, &#8216;Jul&#8217;, &#8216;Aug&#8217;, &#8216;Sep&#8217;,
   &#8216;Oct&#8217;, &#8216;Nov&#8217;, and &#8216;Dec&#8217;.
   </p><p>

   Note that the real C library <code class="function">ctime</code> function puts a newline ('\n')
   character at the end of the string that this function does not.
   Also note that since the kernel has no concept of timezones, the
   returned time is always in GMT.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ctime.stp.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ctime.stp.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-tz-gmtoff.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&#160;4.&#160;Time utility functions&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span>function::tz_gmtoff</span></td></tr></table></div></body></html>