Weird error in date display

Hello everyone,

I have a problem with the display of date stored in database. When it’s displayed in a repeater using a dataset everything works but if I display its by code, nothing goes well : I have a 2h lag and my date goes to the previous day.
For demo I created a test function backend side which illustrates the problem :

Code :

export async function workWithdate(itemId) {
    let dataItem = await wixData.get("Sessions", itemId);
    let date = dataItem.dateDebut;   

    console.log("date  : " + date.toLocaleDateString());
    console.log("timezone " + date.getTimezoneOffset());
    console.log("toUTCString() " + date.toUTCString());

    return date;

Results :

[backend/util.js, workWithdate] called with (407f4a72-432a-4cb7-8bc7-5c3b57d73b01)

[backend/util.js, workWithdate] returned with 
Fri Apr 01 2022 00:00:00 GMT+0200 (heure d’été d’Europe centrale)

date  : 3/31/2022
timezone 0
toUTCString() Thu, 31 Mar 2022 22:00:00 GMT

Results interpretation :
date return by the function is correct : Fri Apr 01 2022 00:00:00 GMT+0200 (heure d’été d’Europe centrale)
but when it’s displayed by date.toLocaleDateString() or toUTCString, output is wrong.

Does anyone have tips with that ? It’s really a blocking issue !

After spending a lot of hours on it, I just realize that :

code : new Date().getTimeZoneOffset()
return 0 in wix environnement
return -60 outside off wix
Correct answers being -60. Maybe a lead ?

After verification, I’m indeed on GMT+1 time zone in the wix’s settings.

You now that if you run it on the backed it uses the server locales. Right?

Thanks JD for your answer.
No I didn’t know but I just realize yesterday that the behavior what different front side indeed.
I finally came with a solution using Intl.DateTimeFormat but it has really been struggling time !!!