I am trying to populate a datetime field on an edit form with a date that is coming from the server in UTC. The problem is when I do
var dat = new Date("UTC date");
dateField.value = dat.toISOString();
it is in UTC and not in the local timezone the user is in.
How to go about setting the value to datetime field which is according to his timezone and not UTC?