PageRenderTime 39ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/www.cppreference.com/wiki/chrono/c/ctime

https://github.com/tsgates/cclookup
#! | 104 lines | 89 code | 15 blank | 0 comment | 0 complexity | d50c93a56d324b84124184fee64ce2ee MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
  4. lang="en" dir="ltr">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>chrono:c:ctime</title>
  8. <meta name="generator" content="DokuWiki" />
  9. <meta name="robots" content="index,follow" />
  10. <meta name="date" content="2010-11-07T15:54:35-0800" />
  11. <meta name="keywords" content="chrono,c,ctime" />
  12. <link rel="search" type="application/opensearchdescription+xml" href="http://www.cppreference.com/wiki/lib/exe/opensearch.php" title="C++ Reference" />
  13. <link rel="start" href="../../../index.html" />
  14. <link rel="contents" href="http://www.cppreference.com/wiki/chrono/c/ctime?do=index" title="Sitemap" />
  15. <link rel="alternate" type="application/rss+xml" title="Recent Changes" href="http://www.cppreference.com/wiki/feed.php" />
  16. <link rel="alternate" type="application/rss+xml" title="Current Namespace" href="http://www.cppreference.com/wiki/feed.php?mode=list&amp;ns=chrono:c" />
  17. <link rel="alternate" type="text/html" title="Plain HTML" href="http://www.cppreference.com/wiki/_export/xhtml/chrono/c/ctime" />
  18. <link rel="alternate" type="text/plain" title="Wiki Markup" href="http://www.cppreference.com/wiki/_export/raw/chrono/c/ctime" />
  19. <link rel="canonical" href="ctime" />
  20. <link rel="stylesheet" media="screen" type="text/css" href="../../lib/exe/css.php@t=custom1&amp;tseed=1289693594" />
  21. <link rel="stylesheet" media="all" type="text/css" href="../../lib/exe/css.php@s=all&amp;t=custom1&amp;tseed=1289693594" />
  22. <link rel="stylesheet" media="print" type="text/css" href="../../lib/exe/css.php@s=print&amp;t=custom1&amp;tseed=1289693594" />
  23. <script type="text/javascript" ><!--//--><![CDATA[//><!--
  24. var NS='chrono:c';var JSINFO = {"id":"chrono:c:ctime","namespace":"chrono:c"};
  25. //--><!]]></script>
  26. <script type="text/javascript" charset="utf-8" src="../../lib/exe/js.php@tseed=1289693594" ></script>
  27. </head>
  28. <body>
  29. <div class="dokuwiki export">
  30. <!-- TOC START -->
  31. <div class="toc">
  32. <div class="tocheader toctoggle" id="toc__header">Table of Contents</div>
  33. <div id="toc__inside">
  34. <ul class="toc">
  35. <li class="clear">
  36. <ul class="toc">
  37. <li class="level2"><div class="li"><span class="li"><a href="ctime#ctime" class="toc">ctime</a></span></div>
  38. <ul class="toc">
  39. <li class="level3"><div class="li"><span class="li"><a href="ctime#parameters" class="toc">Parameters</a></span></div></li>
  40. <li class="level3"><div class="li"><span class="li"><a href="ctime#return_value" class="toc">Return value</a></span></div></li>
  41. <li class="level3"><div class="li"><span class="li"><a href="ctime#see_also" class="toc">See also</a></span></div></li></ul>
  42. </li></ul>
  43. </li></ul>
  44. </div>
  45. </div>
  46. <!-- TOC END -->
  47. <h2 class="sectionedit1"><a name="ctime" id="ctime">ctime</a></h2>
  48. <div class="level2">
  49. <pre class="cpp code cpp"><span class="co2">#include &lt;ctime&gt;</span>
  50. &nbsp;
  51. <span class="kw4">char</span> <span class="sy2">*</span><span class="kw3">ctime</span><span class="br0">&#40;</span> <span class="kw4">const</span> <span class="kw4">time_t</span> <span class="sy2">*</span><span class="kw3">time</span> <span class="br0">&#41;</span><span class="sy4">;</span></pre>
  52. <p>
  53. Converts time since epoch as <code>time_t</code> object to human-readable character string, specifying the local time.The resultant string has the following format:
  54. </p>
  55. <pre class="cpp code cpp">Www Mmm dd hh<span class="sy4">:</span>mm<span class="sy4">:</span>ss yyyy</pre>
  56. <p>
  57. Where <code>Www</code> is the day of the week (one of <code>Mon</code>, <code>Tue</code>, <code>Wed</code>, <code>Thu</code>, <code>Fri</code>, <code>Sat</code>, <code>Sun</code>).
  58. </p>
  59. <p>
  60. <code>Mmm</code> is the month (one of <code>Jan</code>, <code>Feb</code>, <code>Mar</code>, <code>Apr</code>, <code>May</code>, <code>Jun</code>, <code>Jul</code>, <code>Aug</code>, <code>Sep</code>, <code>Oct</code>, <code>Nov</code>, <code>Dec</code>).
  61. </p>
  62. <p>
  63. <code>dd</code> is the day of the month, <code>hh</code> is hours, <code>mm</code> is minutes, <code>ss</code> is seconds and <code>yyyy</code> is years.
  64. </p>
  65. </div>
  66. <!-- EDIT1 SECTION "ctime" [1-646] -->
  67. <h3 class="sectionedit2"><a name="parameters" id="parameters">Parameters</a></h3>
  68. <div class="level3">
  69. <p>
  70. <code>time</code> - time since epoch as <code>time_t</code> object
  71. </p>
  72. </div>
  73. <!-- EDIT2 SECTION "Parameters" [647-716] -->
  74. <h3 class="sectionedit3"><a name="return_value" id="return_value">Return value</a></h3>
  75. <div class="level3">
  76. <p>
  77. pointer to a static character string. The string is shared among <code>ctime</code> and <code>asctime</code> and is overwritten on each invocation.
  78. </p>
  79. </div>
  80. <!-- EDIT3 SECTION "Return value" [717-869] -->
  81. <h3 class="sectionedit4"><a name="see_also" id="see_also">See also</a></h3>
  82. <div class="level3">
  83. <p>
  84. <a href="asctime" class="wikilink1" title="chrono:c:asctime">asctime</a>, <a href="gmtime" class="wikilink1" title="chrono:c:gmtime">gmtime</a>, <a href="localtime" class="wikilink1" title="chrono:c:localtime">localtime</a>, <a href="mktime" class="wikilink1" title="chrono:c:mktime">mktime</a>, <a href="time" class="wikilink1" title="chrono:c:time">time</a>
  85. </p>
  86. </div>
  87. <!-- EDIT4 SECTION "See also" [870-] --></div>
  88. </body>
  89. </html>