Overview #A value of the GeneralizedTime LDAPSyntaxes is a character string representing a date and time.
GeneralizedTime = century year month day hour [ minute [ second / leap-second ] ] [ fraction ] g-time-zone century = 2(%x30-39) ; "00" to "99" year = 2(%x30-39) ; "00" to "99" month = ( %x30 %x31-39 ) ; "01" (January) to "09" / ( %x31 %x30-32 ) ; "10" to "12" day = ( %x30 %x31-39 ) ; "01" to "09" / ( %x31-32 %x30-39 ) ; "10" to "29" / ( %x33 %x30-31 ) ; "30" to "31" hour = ( %x30-31 %x30-39 ) / ( %x32 %x30-33 ) ; "00" to "23" minute = %x30-35 %x30-39 ; "00" to "59" second = ( %x30-35 %x30-39 ) ; "00" to "59" leap-second = ( %x36 %x30 ) ; "60" fraction = ( DOT / COMMA ) 1*(%x30-39) g-time-zone = %x5A ; "Z" / g-differential g-differential = ( MINUS / PLUS ) hour [ minute ] MINUS = %x2D ; minus sign ("-")The <DOT>, <COMMA>, and <PLUS> rules are defined in RFC 4512.
The above ABNF allows character strings that do not represent valid dates (in the Gregorian calendar) and/or valid times (e.g., February 31, 1994). Such character strings SHOULD be considered invalid for this syntax.
The time value represents Coordinated Universal Time (equivalent to Greenwich Mean Time) if the "Z" form of <g-time-zone> is used; otherwise, the value represents a local time in the time zone indicated by <g-differential>. In the latter case, coordinated universal time can be calculated by subtracting the differential from the local time. The "Z" form of <g-time-zone> SHOULD be used in preference to <g-differential>.
- Four digits to signify the year.
- Two digits to signify the month (01 for January, 02 for February, ..., 12 for December).
- Two digits to signify the day of the month (01 through 28/29/30/31 depending on the month and whether it's a leap year).
- Two digits to signify the hour of the day (00 for midnight through 23 for 11 pm).
- An optional two digits that specify the minute of the hour (between 00 and 59).
- An optional two digits that specify the second of the minute (between 00 and 59, or 60 for leap seconds). This may only be included if the timestamp value also contains the minute of the hour.
- An optional period followed by one or more digits that specify the fraction of a second. This may only be included if the timestamp value contains minute and second information.
- A time zone indicator. This may be either the capital letter "Z" to indicate that the value is in the UTC Timezone, or a plus or minus sign followed by two or four digits that specify the offset from UTC time zone.
If <minute> is omitted, then <fraction> represents a fraction of an hour; otherwise, if <second> and <leap-second> are omitted, then <fraction> represents a fraction of a minute; otherwise, <fraction> represents a fraction of a second.
Both example values represent the same Coordinated Universal Time: 10:32 AM, December 16, 1994.
An example of a timestamp in a generalized time format is "20070508200557Z", which specifies a time (in the UTC time zone) of 8:05:57 pm on May 28, 2007. An equivalent value in US central daylight savings time (a five hour offset from UTC) would be 20070508150557-0500".
This syntax corresponds to the GeneralizedTime ASN.1 type from ASN.1, with the constraint that local time without a differential SHALL NOT be used.
The LDAP-specific encoding of a value of this syntax is defined by the GeneralizedTime rule in RFC 4512.
More Information #There might be more information for this subject on one of the following:
- Certificate Validity Period
- Converting AD Times
- Edirectory Anomalies
- Glossary Of LDAP And Directory Terminology
- Microsoft Active Directory Syntax
- Microsoft TIME