在 Active Directory 中,“lockOutTime”属性具有长值。我如何根据该值计算日期和时间(以便找到用户被锁定的时间)?
最佳答案
我用这个方法..
private final static long DIFF_NET_JAVA_FOR_DATES = 11644473600000L + 24 * 60 * 60 * 1000;
Date getDateFromAD(long adLongValue)
{
long milliseconds = (adLongValue / 10000) - DIFF_NET_JAVA_FOR_DATES;
Date date = new Date(milliseconds);
return date;
}
关于java - 从 "lockouttime"属性中检索当前日期和时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28578510/