I am listing a table that is stored in a MySQL BBDD and I don't know why the DateTime field is showing with +1 hour when printed in the Thymeleaf view.
This is the code of the table where I retrieve the info:
<a th:href="@{/new}">Agreagar Nuevo</a>
<table border="1">
<thead style="background-color: #5BA5EA">
<tr>
<th>Nombre</th>
<th>Apellidos</th>
<th>Tlf.</th>
<th>Tratamiento</th>
<th>Doctor</th>
<th>Cita</th>
<th>Acción</th>
</tr>
</thead>
<tbody>
<tr th:each="p:${lista_pacientes}">
<td th:text="${p.nombre_pac}"></td>
<td th:text="${p.apellidos_pac}"></td>
<td th:text="${p.tlf_pac}"></td>
<td th:text="${p.tratamiento_pac}"></td>
<td th:text="${p.doctor_pac}"></td>
<td th:text="${#dates.format(p.cita_pac, 'EEEEE, dd/MMMMM/yyyy - HH:mm')}"> </td>
<td>
<a th:onclick="eliminar([[${p.id_pac}]])" href="#">Borrar</a>
<a th:href="@{/listar/}+${p.id_pac}">Modificar</a>
</td>
</tr>
</tbody>
</table>
And here you can see how that database record is stored in MySql and how the filed date is being printed in the view with +1 hour:
I have tried to change the time zone in MySQL to many different values but it didn't work:
SET time_zone = "+00:00";
Thanks