From b5cdd83b20883297bfaa6f748b1006f329439e16 Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Wed, 8 Jan 2025 19:41:03 +0530 Subject: [PATCH] [fix] Fixed time clause of InfluxQL query --- openwisp_monitoring/check/classes/wifi_clients.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/openwisp_monitoring/check/classes/wifi_clients.py b/openwisp_monitoring/check/classes/wifi_clients.py index ca57fffb..96ee4c55 100644 --- a/openwisp_monitoring/check/classes/wifi_clients.py +++ b/openwisp_monitoring/check/classes/wifi_clients.py @@ -17,14 +17,10 @@ def check(self, store=True): 'content_type': self.related_object._meta.label_lower, 'object_id': str(self.related_object.pk), }, - since=int( - ( - timezone.localtime() - - timezone.timedelta( - minutes=app_settings.WIFI_CLIENTS_CHECK_INTERVAL - ) - ).timestamp() - ), + since=( + timezone.now() + - timezone.timedelta(minutes=app_settings.WIFI_CLIENTS_CHECK_INTERVAL) + ).isoformat(), ) if not values: result = 0