Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions enum4linux-ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

from argparse import ArgumentParser
from collections import OrderedDict
from datetime import datetime
from datetime import datetime, timezone
import json
import os
import random
Expand Down Expand Up @@ -2678,9 +2678,10 @@ def policy_to_human(self, low, high, lockout=False):
tmp = abs(high) * (1e-7)

try:
minutes = datetime.utcfromtimestamp(tmp).minute
hours = datetime.utcfromtimestamp(tmp).hour
time_diff = datetime.utcfromtimestamp(tmp) - datetime.utcfromtimestamp(0)
dt = datetime.fromtimestamp(tmp, tz=timezone.utc)
minutes = dt.minute
hours = dt.hour
time_diff = dt - datetime.fromtimestamp(0, tz=timezone.utc)
days = time_diff.days
except:
return "invalid time"
Expand Down