I need to set date time value for one of the field in an entity using Java Script. The time I want to set is 1 minute after current time. Below is the code for it. The problem I am getting is that when I go to Entity form for Batch to see the time that is set, the time it shows is 5 hours ahead of time that was set using below script. The alert message in the java script shows the correct time.
I know this is related to timezone but how to resolve this.
function scheduleBatch(BatchId){
var batch = {};
var dt = new Date();
dt.setMinutes(dt.getMinutes() + 1); // schedule after one minute of current date time
batch["rsfa_NextActivation"] = dt;
updateRecord(
BatchId,
batch,
"rsfa_batchprocess",
function () {
alert("The batch scheduled successfully for [" + dt + "]");
},
errorHandler
);
}
*This post is locked for comments