Class TUtil
- java.lang.Object
-
- org.apache.directory.fortress.core.util.time.TUtil
-
public final class TUtil extends Object
Utility class to convert current time/date into internal format,Time
, used forConstraint
checksVUtil.validateConstraints(org.apache.directory.fortress.core.model.Session, org.apache.directory.fortress.core.util.VUtil.ConstraintType, boolean)
. This utility processes custom date formats and should not be used by external programs.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Date
decodeGeneralizedTime(String inputString)
Convert from raw ldap generalized time format toDate
.static String
encodeGeneralizedTime(Date date)
Convert from java dateDate
format to raw ldap generalized time format.static Time
getCurrentTime()
Get the curent timestamp from Java and convert toTime
format.
-
-
-
Method Detail
-
getCurrentTime
public static Time getCurrentTime()
Get the curent timestamp from Java and convert toTime
format.- Returns:
- Time
-
decodeGeneralizedTime
public static Date decodeGeneralizedTime(String inputString) throws ParseException
Convert from raw ldap generalized time format toDate
. to decode the string.- Parameters:
inputString
- containing raw ldap generalized time formatted string.- Returns:
- converted to
Date
. - Throws:
ParseException
-
-