This is an automated email from the ASF dual-hosted git repository.
miao pushed a commit to branch rel/1.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.1 by this push:
new 24d860397df Fix the display milliseconds issue with the Grafana plugin
(#9998)
24d860397df is described below
commit 24d860397dfde78cda7b4329b0bcdf453d7dfa61
Author: CloudWise-Lukemiao
<[email protected]>
AuthorDate: Wed May 31 22:02:12 2023 +0800
Fix the display milliseconds issue with the Grafana plugin (#9998)
Co-authored-by: Cloudwise_Luke <[email protected]>
---
grafana-plugin/pkg/plugin/plugin.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grafana-plugin/pkg/plugin/plugin.go
b/grafana-plugin/pkg/plugin/plugin.go
index 89334a9dd35..cb9800e268a 100644
--- a/grafana-plugin/pkg/plugin/plugin.go
+++ b/grafana-plugin/pkg/plugin/plugin.go
@@ -304,7 +304,7 @@ func (d *IoTDBDataSource) query(cxt context.Context, pCtx
backend.PluginContext,
}
times := make([]time.Time, len(queryDataResp.Timestamps))
for c := 0; c < len(queryDataResp.Timestamps); c++ {
- times[c] = time.Unix(queryDataResp.Timestamps[c]/1000,
0)
+ times[c] =
time.Unix(0,queryDataResp.Timestamps[c]*1000000)
}
values := recoverType(queryDataResp.Values[i])
frame.Fields = append(frame.Fields,