Problems with $__timefilter macro and time zone MSSQL

Hi,

I’m new with Grapana and i’m trying to get the min/max/avg value of a mssql query but using the macro $__timefilter.
The problem is that macro uses UTC time for the query and we use the time zone Europe/Madrid in the dash board seetings.

So the query of the screenshoot give me value of 2 offset hour, and not our real time, that its +2.

I see a lot of post of people with this problem but they use MySQL not MSSQL. They resolved that problem using UNIX_TIMESTAMP, but this format is not avaliable in MSSQL.

Anyone can help me??

Sorry for my English.

Kind Regards.