MySQL day function gives incorrect value

  • What Grafana version and what operating system are you using?
    I am building queries in grafana web.
  • What are you trying to achieve?
    I am trying to get the latest value for each day. I know what to do But DAY() function is giving 2 values for same day. Looks like it’s changing day at 6th hour.

My machine is utc+6. But when I run SELECT @@global.time_zone, @@session.time_zone :slight_smile:

So can anyone tell my why is this happening and how to get accurate day values for the correspondign datetimestamps ?
The Mysql DB lives on an Azure VM

What visualization are you using?
Bar chart or time series?

Is your DT UTC?

The DT column is in UTC. I use table view to see the results, then proper visualizations.

The issue is solved. Looks like even though the sql server in Azure has Eastern timezone as shown in the picture in the post, it’s following my browser i.e. my laptop’s timezone utc+6.