grafana默認時區設置?
mysql 設置 time_zone 為 "+8:00" 沒問題,grafana 的時區也設置為UTC+8:00也沒問題。
mysql 表中存儲的日期正常,但 grafanfa 讀到的數據卻快了 8 小時。
?
解決辦法給時間字段加 UNIX_TIMESTAMP() 方法,如將
SELECT
created_at AS "time",
metric AS metric,
value
FROM test
WHERE
$__timeFilter(created_at)
ORDER BY created_at
修改為
SELECT
UNIX_TIMESTAMP(created_at) AS "time",
metric AS metric,
value
FROM test
WHERE
$__timeFilter(created_at)
ORDER BY created_at
上一篇抽樣調查法怎么用