Upon receiving a date in string format like this (e.g.):
"11/10/2015 10:00:00"
It's important to note that this is in UTC time.
However, when creating a Date object from this string, it defaults to local time:
let time = "11/10/2015 10:00:00";
let date = new Date(time);
console.log(date);
Resulting in:
"Tue Nov 10 2015 10:00:00 GMT+0200"
Instead of interpreting it as UTC: "Tue Nov 10 2015 10:00:00")
Attempts with moment.js were also made, but to no avail.
Is there an effective method to have Date() recognize the string as UTC without appending "Z"/"UTC"/"+000" at the end?