Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IADsUser.accountExpirationDate() uses wrong epoch time for date calculations #85

Open
jvz opened this issue Nov 16, 2020 · 1 comment
Open

Comments

@jvz
Copy link

jvz commented Nov 16, 2020

https://docs.microsoft.com/en-us/windows/win32/adschema/a-accountexpires

The date when the account expires. This value represents the number of 100-nanosecond intervals since January 1, 1601 (UTC). A value of 0 or 0x7FFFFFFFFFFFFFFF (9223372036854775807) indicates that the account never expires.

The com4j version is using 1900 instead of 1601 which throws off date calculations considerably.

@jvz
Copy link
Author

jvz commented Nov 17, 2020

Interestingly enough, upon further investigation, the date is somehow being parsed properly, but a timestamp of Mon Jan 01 00:00:00 GMT 1601 is equivalent to the value being 0 from the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant