gpt4 book ai didi

java - 从 "lockouttime"属性中检索当前日期和时间

转载 作者:行者123 更新时间:2023-11-30 11:08:22 25 4
gpt4 key购买 nike

在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com