timePicker with localTime is affected by time zone

I have a timePicker component defined like this

<timePicker id="startTimeField" property="startTime" datatype="localTime" step="30" max="20:00" min="06:00"/>

The corresponding field on the entity is

    @Column(name = "START_TIME")
    private LocalTime startTime;

The data type in the MySQL DB is time.

In development environment where local time zone is America/Detroit, if I choose 7:30 AM and then save the record, when I reload and view it now says 12:30 PM. When I look in the database it also shows the value stored as 12:30:00. It appears to be off by the 5 hour offset between my time zone and UTC, although right now we are UTC-4 because of daylight saving time.

In production where the server and DB are UTC, the values are saved and displayed as entered.

Hello!

Thank you for reporting a problem! I’ve reproduced the issue and created a task: LocalTime property saves time that affected by time zone in MySQL · Issue #3124 · jmix-framework/jmix · GitHub.

For now, it is not obvious where the problem is: in MySQL or in EclipseLink, so we will try to investigate.

Hello,

The cause of created issue is wrong serverTimezone connectoin parameter value in Data Store Properties:
Снимок экрана 2024-04-23 в 16.31.06

Could you please check whether changing or removing this parameters helps in your case?

Regards,
Dmitry

Yes, if I change the time zone to my local zone or remove the serverTimezone parameter then the timePicker works as expected.

Thank you!