anlai / Permitted-Logon-Times-for-Active-Directory

5 stars 2 forks source link

Fixed bug in CalculateDay() #1

Closed brettpostin closed 11 years ago

brettpostin commented 11 years ago

Using PermittedLogonTimes.GetLogonTimes() I was getting strange results for the DayOfWeek properties of the resulting LogonTimes.

Stepping through the code it seems that CalculateDay() was incorrectly dividing the index by 7 days instead of 24 hours.

Changing this seems to work for me, although I will admit I haven't done extensive testing on the impact of the change.

anlai commented 11 years ago

@brettpostin I think you are right, this code was part of a proof of concept, so I've only done very mild testing on it. It's been a couple of years for me on this. Thanks!