Date_trunc() function with Postgresql not working

  • What Grafana version and what operating system are you using?
    8.4.2 dea7d4996a

  • What are you trying to achieve?
    Use Postgresql DATE_TRUNC() Function

  • What happened?
    When I run the following query on Dbeaver or DataGrip, the result is like expected, but in Grafana, its subtracting -1 in the month and showling the last day otf the month.

Query

select DATE_TRUNC('month', t.updated_at) as reference,
       count(distinct id) as quantity,
       status
from table t
where status = 'X'
group by reference, status order by reference desc;

Results in Grafana

2023-02-28 21:00:00.000
2023-01-31 21:00:00.000
2023-01-31 21:00:00.000
2022-11-30 21:00:00.000
2022-07-31 21:00:00.000

  • What did you expect to happen?

Results should be presented like the following:

‘2023-03-01 00:00:00.000000’,
‘2023-02-01 00:00:00.000000’,
‘2023-01-01 00:00:00.000000’,
‘2022-12-01 00:00:00.000000’,
‘2022-08-01 00:00:00.000000’