Class DateUtils
java.lang.Object
org.apache.directory.api.util.DateUtils
Gets the generalized time using the "Z" form of the g-time-zone.
- Author:
- Apache Directory Project
-
Method Summary
Modifier and TypeMethodDescriptionstatic DateconvertIntervalDate(String intervalDate) Converts the 18-digit Active Directory timestamps, also named 'Windows NT time format' or 'Win32 FILETIME or SYSTEMTIME'.static DateConverts a generalized time string to aDateobject.static StringgetGeneralizedTime(long time) Create a GeneralizedTime based on a timestatic StringgetGeneralizedTime(Date date) Create a GeneralizedTime based on a Date instancestatic StringgetGeneralizedTime(TimeProvider timeProvider) Gets the generalized time right now.
-
Method Details
-
getDate
-
getGeneralizedTime
Gets the generalized time right now.GeneralizedTime- Parameters:
timeProvider- The Time provider to use to generate a time- Returns:
- the generalizedTime right now
-
getGeneralizedTime
-
getGeneralizedTime
Create a GeneralizedTime based on a time- Parameters:
time- the time value to be converted to generalized time string- Returns:
- given time in generalized time string format
- See Also:
-
convertIntervalDate
Converts the 18-digit Active Directory timestamps, also named 'Windows NT time format' or 'Win32 FILETIME or SYSTEMTIME'. These are used in Microsoft Active Directory for pwdLastSet, accountExpires, LastLogon, LastLogonTimestamp and LastPwdSet. The timestamp is the number of 100-nanoseconds intervals (1 nanosecond = one billionth of a second) since Jan 1, 1601 UTC.- Parameters:
intervalDate- 18-digit number. Time in 100-nanoseconds intervals since 1.1.1601- Returns:
- The converted date
- Throws:
ParseException- If the given interval is not valid
-