Timezone Error using MS SQL Server (Backwards Time Offset)

I’m attempting to use the graph visual with SQL Server to show item counts in hourly intervals, but my data appears to have the UTC offset in the wrong direction.

For example, a data point that should be at 21:00 local time is showing up at 07:00 on the graph (original UTC for it is 14:00). I’ve verified everything is in UTC including the row data, DB server, and Grafana server. Both the organization and dashboard time zones are configured as “Local browser time”.

Am I missing a configuration somewhere? Here is my query:
SELECT
$__timeGroup(j.PickupUtc, $__interval) as time,
sl.Name as metric,
count(1)
FROM Jobs j LEFT JOIN ServiceLevels sl ON j.ServiceLevelId = sl.Id
WHERE j.dataSourceId = $dataSourceId AND j.PickupUtc BETWEEN $__timeFrom() AND dateadd(hh, 2, $__timeTo())
GROUP BY $__timeGroup(j.PickupUtc, $__interval),
sl.Name
ORDER BY 1

Change in dashboard time zones to UTC (dont use dashboard time zones as “Local browser time”) and in your query remove dateadd. Try this…

There is issue in grafana where it checks time as UTC time but when in interval comparison or group by it checks time as local and only converting interval time to UNIX .

Solution - You should add one more column to table which should contains UNIX equivalent time of your timestamp and pass that in time column and everything will work.

Eg.
Local Browser Time - 2020-05-31 17:21:05 (It is UTC + 5:30)
UNIX_TIMESTAMP - 1590945665