I have the same query in both sides, in the database and in the table from perspective, but the table from perspective shows the a wrong hour.
If the column is rendered as a 'date', I believe the table will automatically offset Date objects to whichever timezone is set as your Project Timezone. What timezone is your gateway in? What timezone is your client/designer in? What is the Project Timezone setting?
Perspective Project Properties | Ignition User Manual (inductiveautomation.com)
Edit: You may need to restart your designer once you change the Project Timezone property.