1.. _datetime: 2 3Supported date and time formats 4=============================== 5 6.. _duration: 7 8Time duration 9------------- 10 11This format is used to express a time duration in the Kerberos 12configuration files and user commands. The allowed formats are: 13 14 ====================== ============== ============ 15 Format Example Value 16 ---------------------- -------------- ------------ 17 h:m[:s] 36:00 36 hours 18 NdNhNmNs 8h30s 8 hours 30 seconds 19 N (number of seconds) 3600 1 hour 20 ====================== ============== ============ 21 22Here *N* denotes a number, *d* - days, *h* - hours, *m* - minutes, 23*s* - seconds. 24 25.. note:: 26 27 The time interval should not exceed 2147483647 seconds. 28 29Examples:: 30 31 Request a ticket valid for one hour, five hours, 30 minutes 32 and 10 days respectively: 33 34 kinit -l 3600 35 kinit -l 5:00 36 kinit -l 30m 37 kinit -l "10d 0h 0m 0s" 38 39 40.. _getdate: 41 42getdate time 43------------ 44 45Some of the kadmin and kdb5_util commands take a date-time in a 46human-readable format. Some of the acceptable date-time 47strings are: 48 49 +-----------+------------------+-----------------+ 50 | | Format | Example | 51 +===========+==================+=================+ 52 | Date | mm/dd/yy | 07/27/12 | 53 | +------------------+-----------------+ 54 | | month dd, yyyy | Jul 27, 2012 | 55 | +------------------+-----------------+ 56 | | yyyy-mm-dd | 2012-07-27 | 57 +-----------+------------------+-----------------+ 58 | Absolute | HH:mm[:ss]pp | 08:30 PM | 59 | time +------------------+-----------------+ 60 | | hh:mm[:ss] | 20:30 | 61 +-----------+------------------+-----------------+ 62 | Relative | N tt | 30 sec | 63 | time | | | 64 +-----------+------------------+-----------------+ 65 | Time zone | Z | EST | 66 | +------------------+-----------------+ 67 | | z | -0400 | 68 +-----------+------------------+-----------------+ 69 70(See :ref:`abbreviation`.) 71 72Examples:: 73 74 Create a principal that expires on the date indicated: 75 addprinc test1 -expire "3/27/12 10:00:07 EST" 76 addprinc test2 -expire "January 23, 2015 10:05pm" 77 addprinc test3 -expire "22:00 GMT" 78 Add a principal that will expire in 30 minutes: 79 addprinc test4 -expire "30 minutes" 80 81 82.. _abstime: 83 84Absolute time 85------------- 86 87This rarely used date-time format can be noted in one of the 88following ways: 89 90 91 +------------------------+----------------------+--------------+ 92 | Format | Example | Value | 93 +========================+======================+==============+ 94 | yyyymmddhhmmss | 20141231235900 | One minute | 95 +------------------------+----------------------+ before 2015 | 96 | yyyy.mm.dd.hh.mm.ss | 2014.12.31.23.59.00 | | 97 +------------------------+----------------------+ | 98 | yymmddhhmmss | 141231235900 | | 99 +------------------------+----------------------+ | 100 | yy.mm.dd.hh.mm.ss | 14.12.31.23.59.00 | | 101 +------------------------+----------------------+ | 102 | dd-month-yyyy:hh:mm:ss | 31-Dec-2014:23:59:00 | | 103 +------------------------+----------------------+--------------+ 104 | hh:mm:ss | 20:00:00 | 8 o'clock in | 105 +------------------------+----------------------+ the evening | 106 | hhmmss | 200000 | | 107 +------------------------+----------------------+--------------+ 108 109(See :ref:`abbreviation`.) 110 111Example:: 112 113 Set the default expiration date to July 27, 2012 at 20:30 114 default_principal_expiration = 20120727203000 115 116 117.. _abbreviation: 118 119Abbreviations used in this document 120~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 121 122| *month* : locale’s month name or its abbreviation; 123| *dd* : day of month (01-31); 124| *HH* : hours (00-12); 125| *hh* : hours (00-23); 126| *mm* : in time - minutes (00-59); in date - month (01-12); 127| *N* : number; 128| *pp* : AM or PM; 129| *ss* : seconds (00-60); 130| *tt* : time units (hours, minutes, min, seconds, sec); 131| *yyyy* : year; 132| *yy* : last two digits of the year; 133| *Z* : alphabetic time zone abbreviation; 134| *z* : numeric time zone; 135 136.. note:: 137 138 - If the date specification contains spaces, you may need to 139 enclose it in double quotes; 140 - All keywords are case-insensitive. 141