I googled around but didn't find an immediate solution.
- the data object has a LocalDate field
- the MySQL database has a matching DATE column
Date is created, for example:
LocalDate d = LocalDate.of(2020, 1, 3);
It's written to SQL as:
stmt.setObject(1, d)); // or setDate with Date.valueOf(d)
In SQL it's stored as UTC (I guess) so due to the offset (+1) it's now 2020-01-02
and also fetched as such.
(It obviously can't restore to the next day if DATE column doesn't store the hours.)