Hi Community,
We are using JavaScript on the form to calculate the next date and time based on a day of the week, hour and minute.
We are using the following function to calculate the next date.
function getNextDate(startdate, nextDay, nextHour, nextMinute) {
var resultDate = new Date(startdate.getTime());
resultDate.setDate(startdate.getDate() + (7 + nextDay- startdate.getDay()) % 7);
resultDate.setHours(nextHour);
resultDate.setMinutes(nextMinute);
resultDate.setSeconds(0);
resultDate.setMilliseconds(0);
return resultDate;
}
The returned date is ok in GMT-4. How can we get the date calculated in GMT so that when it is saved in the BDM Date-Time (no time zone) it is impacted by the timezone.