I am trying to increment the time by 1 hour for Timestamp in the format (YYYY-MM-DDTHH:MM:SS). This works perfectly fine till time is 22:00:00. However when input time is 23:00:00, the time component changes correctly to 00:00:00, however the corresponding date increments to over a month (Jumps 1 full month). Ex. 2020-07-31T23:00:00 changes to 2020-09-01T00:00:00. Any help on this is greatly appreciated.
var sdate = '2020-07-31T23:00:00';
var temp1 = sdate.split('T');
document.write(temp1);
var d = temp1[0].split('-');
var t = temp1[1].split(':');
document.write("<br />");
document.write(d);
document.write("<br />");
document.write(t);
var dt3 = new Date(d[0], d[1], d[2], t[0], t[1], t[2], 0);
var dt4 = dt3.setSeconds(dt3.getSeconds() + 3600);
var final = new Date(dt4);
document.write("<br />");
document.write(final);
document.write("<br />");
document.write(final.getFullYear());
document.write("<br />");
document.write(final.getMonth());
document.write("<br />");
document.write(final.getDate());
document.write("<br />");
document.write(final.getHours());
document.write("<br />");
document.write(final.getMinutes());
document.write("<br />");
document.write(final.getSeconds());