-
Notifications
You must be signed in to change notification settings - Fork 103
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
[JENKINS-55813] Improve analysis of the AD attributes #34
base: master
Are you sure you want to change the base?
[JENKINS-55813] Improve analysis of the AD attributes #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small changes to consider, but otherwise looks good.
// documentation: https://docs.microsoft.com/en-us/windows/desktop/adschema/a-accountexpires | ||
// code inspired by https://community.oracle.com/thread/1157460 | ||
private static long getWin32EpochHundredNanos() { | ||
GregorianCalendar win32Epoch = new GregorianCalendar(1601, Calendar.JANUARY, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZonedDateTime.of(1601, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)
could be easier to calculate with here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I followed the code as mentioned in the javadoc
- I do not find the proposed one to be more readable than the one in the PR
If anybody else agree on your proposal I will change ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My proposal was taking a random java.time class that sounded appropriate. Calendar is much more annoying to use.
🤷♀️ This is beyond my ken! |
Do you think that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but needs tests
Taking a fresh look at this, I believe the configured |
See JENKINS-55813.