From 84ef241e160cf01d1dc8933ef699c0c836fc82ad Mon Sep 17 00:00:00 2001 From: xtaodada Date: Tue, 18 Jun 2024 13:19:24 +0800 Subject: [PATCH] :bug: Fix timezone not right in action log --- core/services/self_help/repositories.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/services/self_help/repositories.py b/core/services/self_help/repositories.py index 99c52a8..74f2e19 100644 --- a/core/services/self_help/repositories.py +++ b/core/services/self_help/repositories.py @@ -26,6 +26,8 @@ class ActionLogRepository(BaseService.Component): client: "InfluxDBClientAsync" query = ( 'import "date"' + 'import "timezone"' + 'option location = timezone.location(name: "Asia/Shanghai")' 'from(bucket: "{}")' "|> range(start: -180d)" '|> filter(fn: (r) => r["_measurement"] == "action_log")'