How to get the number of visits for a given day through the database?

Hi there,
When extracting the visits data from the Matomo MySQL database to insert it within a data visualization software I am not getting the exact same number as in the Matomo UI.
When looking at the same report within the visit log of the UI, I noticed that Matomo is not using the visit_first_action_time but the server hour instead.

-> Do you have any ideas how I could get “serverDate” and “visitServerHour” in MySQL?

Thank you