1 2<!DOCTYPE html> 3 4<html> 5 <head> 6 <meta charset="utf-8" /> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" /> 8 9 <title>Supported date and time formats — MIT Kerberos Documentation</title> 10 <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> 11 <link rel="stylesheet" type="text/css" href="../_static/agogo.css" /> 12 <link rel="stylesheet" type="text/css" href="../_static/kerb.css" /> 13 <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> 14 <script src="../_static/jquery.js"></script> 15 <script src="../_static/underscore.js"></script> 16 <script src="../_static/doctools.js"></script> 17 <link rel="author" title="About these documents" href="../about.html" /> 18 <link rel="index" title="Index" href="../genindex.html" /> 19 <link rel="search" title="Search" href="../search.html" /> 20 <link rel="copyright" title="Copyright" href="../copyright.html" /> 21 <link rel="next" title="Protocols and file formats" href="../formats/index.html" /> 22 <link rel="prev" title="stash file" href="stash_file_def.html" /> 23 </head><body> 24 <div class="header-wrapper"> 25 <div class="header"> 26 27 28 <h1><a href="../index.html">MIT Kerberos Documentation</a></h1> 29 30 <div class="rel"> 31 32 <a href="../index.html" title="Full Table of Contents" 33 accesskey="C">Contents</a> | 34 <a href="stash_file_def.html" title="stash file" 35 accesskey="P">previous</a> | 36 <a href="../formats/index.html" title="Protocols and file formats" 37 accesskey="N">next</a> | 38 <a href="../genindex.html" title="General Index" 39 accesskey="I">index</a> | 40 <a href="../search.html" title="Enter search criteria" 41 accesskey="S">Search</a> | 42 <a href="mailto:krb5-bugs@mit.edu?subject=Documentation__Supported date and time formats">feedback</a> 43 </div> 44 </div> 45 </div> 46 47 <div class="content-wrapper"> 48 <div class="content"> 49 <div class="document"> 50 51 <div class="documentwrapper"> 52 <div class="bodywrapper"> 53 <div class="body" role="main"> 54 55 <section id="supported-date-and-time-formats"> 56<span id="datetime"></span><h1>Supported date and time formats<a class="headerlink" href="#supported-date-and-time-formats" title="Permalink to this headline">¶</a></h1> 57<section id="time-duration"> 58<span id="duration"></span><h2>Time duration<a class="headerlink" href="#time-duration" title="Permalink to this headline">¶</a></h2> 59<p>This format is used to express a time duration in the Kerberos 60configuration files and user commands. The allowed formats are:</p> 61<blockquote> 62<div><table class="docutils align-default"> 63<colgroup> 64<col style="width: 40%" /> 65<col style="width: 25%" /> 66<col style="width: 35%" /> 67</colgroup> 68<tbody> 69<tr class="row-odd"><td><p>Format</p></td> 70<td><p>Example</p></td> 71<td><p>Value</p></td> 72</tr> 73<tr class="row-even"><td><p>h:m[:s]</p></td> 74<td><p>36:00</p></td> 75<td><p>36 hours</p></td> 76</tr> 77<tr class="row-odd"><td><p>NdNhNmNs</p></td> 78<td><p>8h30s</p></td> 79<td><p>8 hours 30 seconds</p></td> 80</tr> 81<tr class="row-even"><td><p>N (number of seconds)</p></td> 82<td><p>3600</p></td> 83<td><p>1 hour</p></td> 84</tr> 85</tbody> 86</table> 87</div></blockquote> 88<p>Here <em>N</em> denotes a number, <em>d</em> - days, <em>h</em> - hours, <em>m</em> - minutes, 89<em>s</em> - seconds.</p> 90<div class="admonition note"> 91<p class="admonition-title">Note</p> 92<p>The time interval should not exceed 2147483647 seconds.</p> 93</div> 94<p>Examples:</p> 95<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Request</span> <span class="n">a</span> <span class="n">ticket</span> <span class="n">valid</span> <span class="k">for</span> <span class="n">one</span> <span class="n">hour</span><span class="p">,</span> <span class="n">five</span> <span class="n">hours</span><span class="p">,</span> <span class="mi">30</span> <span class="n">minutes</span> 96<span class="ow">and</span> <span class="mi">10</span> <span class="n">days</span> <span class="n">respectively</span><span class="p">:</span> 97 98 <span class="n">kinit</span> <span class="o">-</span><span class="n">l</span> <span class="mi">3600</span> 99 <span class="n">kinit</span> <span class="o">-</span><span class="n">l</span> <span class="mi">5</span><span class="p">:</span><span class="mi">00</span> 100 <span class="n">kinit</span> <span class="o">-</span><span class="n">l</span> <span class="mi">30</span><span class="n">m</span> 101 <span class="n">kinit</span> <span class="o">-</span><span class="n">l</span> <span class="s2">"10d 0h 0m 0s"</span> 102</pre></div> 103</div> 104</section> 105<section id="getdate-time"> 106<span id="getdate"></span><h2>getdate time<a class="headerlink" href="#getdate-time" title="Permalink to this headline">¶</a></h2> 107<p>Some of the kadmin and kdb5_util commands take a date-time in a 108human-readable format. Some of the acceptable date-time 109strings are:</p> 110<blockquote> 111<div><table class="docutils align-default"> 112<colgroup> 113<col style="width: 24%" /> 114<col style="width: 39%" /> 115<col style="width: 37%" /> 116</colgroup> 117<thead> 118<tr class="row-odd"><th class="head"></th> 119<th class="head"><p>Format</p></th> 120<th class="head"><p>Example</p></th> 121</tr> 122</thead> 123<tbody> 124<tr class="row-even"><td rowspan="3"><p>Date</p></td> 125<td><p>mm/dd/yy</p></td> 126<td><p>07/27/12</p></td> 127</tr> 128<tr class="row-odd"><td><p>month dd, yyyy</p></td> 129<td><p>Jul 27, 2012</p></td> 130</tr> 131<tr class="row-even"><td><p>yyyy-mm-dd</p></td> 132<td><p>2012-07-27</p></td> 133</tr> 134<tr class="row-odd"><td rowspan="2"><p>Absolute 135time</p></td> 136<td><p>HH:mm[:ss]pp</p></td> 137<td><p>08:30 PM</p></td> 138</tr> 139<tr class="row-even"><td><p>hh:mm[:ss]</p></td> 140<td><p>20:30</p></td> 141</tr> 142<tr class="row-odd"><td><p>Relative 143time</p></td> 144<td><p>N tt</p></td> 145<td><p>30 sec</p></td> 146</tr> 147<tr class="row-even"><td rowspan="2"><p>Time zone</p></td> 148<td><p>Z</p></td> 149<td><p>EST</p></td> 150</tr> 151<tr class="row-odd"><td><p>z</p></td> 152<td><p>-0400</p></td> 153</tr> 154</tbody> 155</table> 156</div></blockquote> 157<p>(See <a class="reference internal" href="#abbreviation"><span class="std std-ref">Abbreviations used in this document</span></a>.)</p> 158<p>Examples:</p> 159<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Create</span> <span class="n">a</span> <span class="n">principal</span> <span class="n">that</span> <span class="n">expires</span> <span class="n">on</span> <span class="n">the</span> <span class="n">date</span> <span class="n">indicated</span><span class="p">:</span> 160 <span class="n">addprinc</span> <span class="n">test1</span> <span class="o">-</span><span class="n">expire</span> <span class="s2">"3/27/12 10:00:07 EST"</span> 161 <span class="n">addprinc</span> <span class="n">test2</span> <span class="o">-</span><span class="n">expire</span> <span class="s2">"January 23, 2015 10:05pm"</span> 162 <span class="n">addprinc</span> <span class="n">test3</span> <span class="o">-</span><span class="n">expire</span> <span class="s2">"22:00 GMT"</span> 163<span class="n">Add</span> <span class="n">a</span> <span class="n">principal</span> <span class="n">that</span> <span class="n">will</span> <span class="n">expire</span> <span class="ow">in</span> <span class="mi">30</span> <span class="n">minutes</span><span class="p">:</span> 164 <span class="n">addprinc</span> <span class="n">test4</span> <span class="o">-</span><span class="n">expire</span> <span class="s2">"30 minutes"</span> 165</pre></div> 166</div> 167</section> 168<section id="absolute-time"> 169<span id="abstime"></span><h2>Absolute time<a class="headerlink" href="#absolute-time" title="Permalink to this headline">¶</a></h2> 170<p>This rarely used date-time format can be noted in one of the 171following ways:</p> 172<blockquote> 173<div><table class="docutils align-default"> 174<colgroup> 175<col style="width: 40%" /> 176<col style="width: 37%" /> 177<col style="width: 23%" /> 178</colgroup> 179<thead> 180<tr class="row-odd"><th class="head"><p>Format</p></th> 181<th class="head"><p>Example</p></th> 182<th class="head"><p>Value</p></th> 183</tr> 184</thead> 185<tbody> 186<tr class="row-even"><td><p>yyyymmddhhmmss</p></td> 187<td><p>20141231235900</p></td> 188<td rowspan="5"><p>One minute 189before 2015</p></td> 190</tr> 191<tr class="row-odd"><td><p>yyyy.mm.dd.hh.mm.ss</p></td> 192<td><p>2014.12.31.23.59.00</p></td> 193</tr> 194<tr class="row-even"><td><p>yymmddhhmmss</p></td> 195<td><p>141231235900</p></td> 196</tr> 197<tr class="row-odd"><td><p>yy.mm.dd.hh.mm.ss</p></td> 198<td><p>14.12.31.23.59.00</p></td> 199</tr> 200<tr class="row-even"><td><p>dd-month-yyyy:hh:mm:ss</p></td> 201<td><p>31-Dec-2014:23:59:00</p></td> 202</tr> 203<tr class="row-odd"><td><p>hh:mm:ss</p></td> 204<td><p>20:00:00</p></td> 205<td rowspan="2"><p>8 o’clock in 206the evening</p></td> 207</tr> 208<tr class="row-even"><td><p>hhmmss</p></td> 209<td><p>200000</p></td> 210</tr> 211</tbody> 212</table> 213</div></blockquote> 214<p>(See <a class="reference internal" href="#abbreviation"><span class="std std-ref">Abbreviations used in this document</span></a>.)</p> 215<p>Example:</p> 216<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Set</span> <span class="n">the</span> <span class="n">default</span> <span class="n">expiration</span> <span class="n">date</span> <span class="n">to</span> <span class="n">July</span> <span class="mi">27</span><span class="p">,</span> <span class="mi">2012</span> <span class="n">at</span> <span class="mi">20</span><span class="p">:</span><span class="mi">30</span> 217<span class="n">default_principal_expiration</span> <span class="o">=</span> <span class="mi">20120727203000</span> 218</pre></div> 219</div> 220<section id="abbreviations-used-in-this-document"> 221<span id="abbreviation"></span><h3>Abbreviations used in this document<a class="headerlink" href="#abbreviations-used-in-this-document" title="Permalink to this headline">¶</a></h3> 222<div class="line-block"> 223<div class="line"><em>month</em> : locale’s month name or its abbreviation;</div> 224<div class="line"><em>dd</em> : day of month (01-31);</div> 225<div class="line"><em>HH</em> : hours (00-12);</div> 226<div class="line"><em>hh</em> : hours (00-23);</div> 227<div class="line"><em>mm</em> : in time - minutes (00-59); in date - month (01-12);</div> 228<div class="line"><em>N</em> : number;</div> 229<div class="line"><em>pp</em> : AM or PM;</div> 230<div class="line"><em>ss</em> : seconds (00-60);</div> 231<div class="line"><em>tt</em> : time units (hours, minutes, min, seconds, sec);</div> 232<div class="line"><em>yyyy</em> : year;</div> 233<div class="line"><em>yy</em> : last two digits of the year;</div> 234<div class="line"><em>Z</em> : alphabetic time zone abbreviation;</div> 235<div class="line"><em>z</em> : numeric time zone;</div> 236</div> 237<div class="admonition note"> 238<p class="admonition-title">Note</p> 239<ul class="simple"> 240<li><p>If the date specification contains spaces, you may need to 241enclose it in double quotes;</p></li> 242<li><p>All keywords are case-insensitive.</p></li> 243</ul> 244</div> 245</section> 246</section> 247</section> 248 249 250 <div class="clearer"></div> 251 </div> 252 </div> 253 </div> 254 </div> 255 <div class="sidebar"> 256 257 <h2>On this page</h2> 258 <ul> 259<li><a class="reference internal" href="#">Supported date and time formats</a><ul> 260<li><a class="reference internal" href="#time-duration">Time duration</a></li> 261<li><a class="reference internal" href="#getdate-time">getdate time</a></li> 262<li><a class="reference internal" href="#absolute-time">Absolute time</a><ul> 263<li><a class="reference internal" href="#abbreviations-used-in-this-document">Abbreviations used in this document</a></li> 264</ul> 265</li> 266</ul> 267</li> 268</ul> 269 270 <br/> 271 <h2>Table of contents</h2> 272 <ul class="current"> 273<li class="toctree-l1"><a class="reference internal" href="../user/index.html">For users</a></li> 274<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">For administrators</a></li> 275<li class="toctree-l1"><a class="reference internal" href="../appdev/index.html">For application developers</a></li> 276<li class="toctree-l1"><a class="reference internal" href="../plugindev/index.html">For plugin module developers</a></li> 277<li class="toctree-l1"><a class="reference internal" href="../build/index.html">Building Kerberos V5</a></li> 278<li class="toctree-l1 current"><a class="reference internal" href="index.html">Kerberos V5 concepts</a><ul class="current"> 279<li class="toctree-l2"><a class="reference internal" href="ccache_def.html">Credential cache</a></li> 280<li class="toctree-l2"><a class="reference internal" href="keytab_def.html">keytab</a></li> 281<li class="toctree-l2"><a class="reference internal" href="rcache_def.html">replay cache</a></li> 282<li class="toctree-l2"><a class="reference internal" href="stash_file_def.html">stash file</a></li> 283<li class="toctree-l2 current"><a class="current reference internal" href="#">Supported date and time formats</a></li> 284</ul> 285</li> 286<li class="toctree-l1"><a class="reference internal" href="../formats/index.html">Protocols and file formats</a></li> 287<li class="toctree-l1"><a class="reference internal" href="../mitK5features.html">MIT Kerberos features</a></li> 288<li class="toctree-l1"><a class="reference internal" href="../build_this.html">How to build this documentation from the source</a></li> 289<li class="toctree-l1"><a class="reference internal" href="../about.html">Contributing to the MIT Kerberos Documentation</a></li> 290<li class="toctree-l1"><a class="reference internal" href="../resources.html">Resources</a></li> 291</ul> 292 293 <br/> 294 <h4><a href="../index.html">Full Table of Contents</a></h4> 295 <h4>Search</h4> 296 <form class="search" action="../search.html" method="get"> 297 <input type="text" name="q" size="18" /> 298 <input type="submit" value="Go" /> 299 <input type="hidden" name="check_keywords" value="yes" /> 300 <input type="hidden" name="area" value="default" /> 301 </form> 302 303 </div> 304 <div class="clearer"></div> 305 </div> 306 </div> 307 308 <div class="footer-wrapper"> 309 <div class="footer" > 310 <div class="right" ><i>Release: 1.21.3</i><br /> 311 © <a href="../copyright.html">Copyright</a> 1985-2024, MIT. 312 </div> 313 <div class="left"> 314 315 <a href="../index.html" title="Full Table of Contents" 316 >Contents</a> | 317 <a href="stash_file_def.html" title="stash file" 318 >previous</a> | 319 <a href="../formats/index.html" title="Protocols and file formats" 320 >next</a> | 321 <a href="../genindex.html" title="General Index" 322 >index</a> | 323 <a href="../search.html" title="Enter search criteria" 324 >Search</a> | 325 <a href="mailto:krb5-bugs@mit.edu?subject=Documentation__Supported date and time formats">feedback</a> 326 </div> 327 </div> 328 </div> 329 330 </body> 331</html>