Since it is a JS Date object, you can use any of the various methods that are on Date. JavaScript Date Reference
There are probably many ways to go about doing it. Maybe you could get the timezone offset, subtract that from the original milliseconds since epoch that is returned, and then construct a new date from that value? JavaScript getTimezoneOffset() Method
If the Date field is actually of Date data type, then it should accept just a regular JS Date object. However, the function you reference above returns a string. Can you see if just passing in a new Date works?
new Date()
There is a discussion in the Qt doc about how a JS Date is equivalent to a QDateTime, which is what we use internally - Data Type Conversion Between QML and C++ | Qt QML 5.8
//
Since it is a JS Date object, you can use any of the various methods that are on Date. JavaScript Date Reference
There are probably many ways to go about doing it. Maybe you could get the timezone offset, subtract that from the original milliseconds since epoch that is returned, and then construct a new date from that value? JavaScript getTimezoneOffset() Method