Calendar event resize and move adjusts times by one hour

Wappler: v3.9.6
MacOS
PHP

I’ve come across something strange. I have the events working well and can select a time period and it returns the correct start/end date/time but if I resize or move the event, the time returned is one hour less than it should be. The variables are identical in all three - Event Drop/Move, Event Resize and Select but only Select is returning it correctly.

    dmx-on:select="varShowEditColumn.setValue(1);formAddEditVisit.inp_visitDateTime.setValue($event.event.start.substr(0, 16));formAddEditVisit.inp_visitEndDateTime.setValue($event.event.end.substr(0, 16));connSelectedVisit.reset();formAddEditVisit.inp_VisitID.setValue(0)"
    					dmx-business-hours.businesshours="{startTime:'08:00',endTime:'18:00',daysOfWeek:[1,2,3,4,5]}" business-hours="true" dmx-constraint=""
    					dmx-on:eventresize="varShowEditColumn.setValue(1);formAddEditVisit.inp_visitDateTime.setValue($event.event.start.substr(0, 16));formAddEditVisit.inp_visitEndDateTime.setValue($event.event.end.substr(0, 16))"
    					dmx-on:eventdrop="varShowEditColumn.setValue(1);formAddEditVisit.inp_visitDateTime.setValue($event.event.start.substr(0, 16));formAddEditVisit.inp_visitEndDateTime.setValue($event.event.end.substr(0, 16))">

The substr is there as that’s the only way I could get dates and times correctly into a type="datetime-local" input.

I’m in the UK which is now in British Summer Time so we’re an hour ahead of GMT so is that what’s causing it? If so, why is dmx-on:select working correctly?

I think I may have a solution. Instead of showing the details in a form when resizing or moving an event, I should just update the record directly which won’t then go through the date time input which is set to locale thus adjusting the time. I’ll try this and update here.

I’ve got it all sorted. I needed to not convert the date to UTC as that was shifting it by an hour.