summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/dhcp.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/op_mode/dhcp.py b/src/op_mode/dhcp.py
index 9cb5a84ae..1f8d85823 100755
--- a/src/op_mode/dhcp.py
+++ b/src/op_mode/dhcp.py
@@ -19,7 +19,6 @@ import sys
import typing
from datetime import datetime
-from datetime import timezone
from glob import glob
from ipaddress import ip_address
from tabulate import tabulate
@@ -105,12 +104,8 @@ def _get_formatted_server_leases(raw_data, family='inet'):
ipaddr = lease.get('ip')
hw_addr = lease.get('mac')
state = lease.get('state')
- start = datetime.fromtimestamp(lease.get('start'), timezone.utc)
- end = (
- datetime.fromtimestamp(lease.get('end'), timezone.utc)
- if lease.get('end')
- else '-'
- )
+ start = datetime.fromtimestamp(lease.get('start'))
+ end = datetime.fromtimestamp(lease.get('end')) if lease.get('end') else '-'
remain = lease.get('remaining')
pool = lease.get('pool')
hostname = lease.get('hostname')
@@ -136,14 +131,8 @@ def _get_formatted_server_leases(raw_data, family='inet'):
ipaddr = lease.get('ip')
hw_addr = lease.get('mac')
state = lease.get('state')
- start = datetime.fromtimestamp(
- lease.get('last_communication'), timezone.utc
- )
- end = (
- datetime.fromtimestamp(lease.get('end'), timezone.utc)
- if lease.get('end')
- else '-'
- )
+ start = datetime.fromtimestamp(lease.get('last_communication'))
+ end = datetime.fromtimestamp(lease.get('end')) if lease.get('end') else '-'
remain = lease.get('remaining')
lease_type = lease.get('type')
pool = lease.get('pool')