Tag History Time Weighted Average values offset by 1 day

I am having trouble getting my tag history query to align the dates with my data properly. I have attached pictures of my raw data from the the tag history query, the tag history properties, the property editor settings (shows the data ranges for the tag history) and a SQL query directly from the database that shows all of the actual data in the DB.

You can see that my SQL data (sqlData.jpg) has no values for 7/20 and 7/21 so the rawData for those dates should be ‘0.1’ but for some reason it shows up as being ‘0.1’ on 7/21 and 7/22 in the tag history query (rawdata.jpg). The interval for the tag history query is set to 24 hours.

Why is it showing up a day off? How do I fix this?

Ignition Platform 7.6.2 (b2368)

I believe the Time Weighted Average is calculated with the time leading up to your data point. That means that at midnight, you are getting the data from the previous day.