3 Supported date and time formats
4 ===============================
11 This format is used to express a time duration in the Kerberos
12 configuration files and user commands. The allowed formats are:
14 ====================== ============== ============
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 ====================== ============== ============
22 Here *N* denotes a number, *d* - days, *h* - hours, *m* - minutes,
27 The time interval should not exceed 2147483647 seconds.
31 Request a ticket valid for one hour, five hours, 30 minutes
32 and 10 days respectively:
37 kinit -l "10d 0h 0m 0s"
45 Some of the kadmin and kdb5_util commands take a date-time in a
46 human-readable format. Some of the acceptable date-time
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 |
64 +-----------+------------------+-----------------+
65 | Time zone | Z | EST |
66 | +------------------+-----------------+
68 +-----------+------------------+-----------------+
70 (See :ref:`abbreviation`.)
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"
87 This rarely used date-time format can be noted in one of the
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 +------------------------+----------------------+--------------+
109 (See :ref:`abbreviation`.)
113 Set the default expiration date to July 27, 2012 at 20:30
114 default_principal_expiration = 20120727203000
119 Abbreviations used in this document
120 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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);
129 | *ss* : seconds (00-60);
130 | *tt* : time units (hours, minutes, min, seconds, sec);
132 | *yy* : last two digits of the year;
133 | *Z* : alphabetic time zone abbreviation;
134 | *z* : numeric time zone;
138 - If the date specification contains spaces, you may need to
139 enclose it in double quotes;
140 - All keywords are case-insensitive.