diff --git a/isc_dhcp_leases/iscdhcpleases.py b/isc_dhcp_leases/iscdhcpleases.py index adddc9e..8c2b34a 100644 --- a/isc_dhcp_leases/iscdhcpleases.py +++ b/isc_dhcp_leases/iscdhcpleases.py @@ -116,9 +116,9 @@ def valid(self): :return: bool: True if lease is valid """ if self.end is None: - return self.start <= datetime.datetime.now() + return self.start <= datetime.datetime.utcnow() else: - return self.start <= datetime.datetime.now() <= self.end + return self.start <= datetime.datetime.utcnow() <= self.end @property def active(self): @@ -178,7 +178,7 @@ def valid(self): if self.end is None: return True else: - return datetime.datetime.now() <= self.end + return datetime.datetime.utcnow() <= self.end @property def active(self):