Date Time Formatting suddenly doing strange things

Wappler 5.8.2 still, and a project I work on daily for the last couple years.

In my database I have a mariadb datetime field with data like 2024-01-04 21:00:00

A query in SC gives 2024-01-04T21:00:00.000Z
Normally I would just use {{thedate.replace('Z','').formatDate('yyyy-MM-dd HH:mm:ss')}} and it would output as 2024-01-04 21:00:00, however for some reason it suddenly is outputting as 2024-01-04 22:00:00 1 hour more than i want.

I have made no major alterations at all, so its just really odd that suddenly it started doing this. Anyone got any ideas.

Just thought about it a bit more and realised that the one difference is that I am pulling the datetime from a VIEW, and not from an original table, testing the same on the original data works as expected, but doing it from the VIEW table produces this strange result even though in Wappler custom database query it auto pulled the schema as datetime

EDIT: Landed up having to do this
{{(thedate.toUTCTime()).replace('Z','').formatDate('yyyy-MM-dd HH:mm:ss')}}
Finally working