Why is there still an 8-hour difference?

The query criteria are from 20240-04-01 00:00:00 to 2024-04-01 23:59:59

The actual execution result was from 2024-03-31T16:00:00Z to 2024-04-01T15:59:59Z

I have set the time zone to “Asia/Shangha"

Excuse me, why is this?

grafana needs the datetime column as UTC.you need to convert your date time to UTC via a function.
something like this for your query

convert_tz(timestamp,'Asia/Shangha','UTC')

Notice the 8 hour difference
image