Commit 16eff860 authored by Jonathan CLARKE's avatar Jonathan CLARKE
Browse files

Backport correction in rev 18 to 1.0 branch (Fix potential bug in getting a long from a string)

parent 6f1783d4
......@@ -111,6 +111,9 @@ public class AD {
* @return the number of weeks since the last logon
*/
public static int getNumberOfWeeksSinceLastLogon(String lastLogonTimestamp) {
if(lastLogonTimestamp == null || lastLogonTimestamp.length() == 0) {
return 0;
}
Long ts = Long.parseLong(lastLogonTimestamp);
//We divide the ts by 10⁷ for seconds, 60 seconds, 60 minutes, 24 hours, 7 days
long llastLogonAdjust=116444736000000000L; // adjust factor for converting it to java
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment