I have some javascript that is acting weird. I create two dates, but they are randomly in different timezones which is messing me up when calculating the difference between the two. I am in the EST timezone, but for some reason the first date get created as a EDT date.
Basically my question is why does this javascript produce the output that it does?
var xstartTime = new Date(startYear, StartMonth, StartDay, StartHour, StartMinute, 0, 0);
var xendTime = new Date(EndYear, EndMonth, EndDay, EndHour, EndMinute, 0, 0);
console.log("StartMinute" + StartMinute + "StartHour" + StartHour + "StartDay" + StartDay + "StartMonth" + StartMonth + "startYear" + startYear);
console.log(xstartTime);
console.log("EndMinute" + EndMinute + "EndHour" + EndHour + "EndDay" + EndDay + "EndMonth" + EndMonth + "EndYear" + EndYear);
console.log(xendTime);
StartMinute0StartHour0StartDay3StartMonth10startYear2013
Sun Nov 3 00:00:00 EDT 2013
EndMinute59EndHour23EndDay3EndMonth10EndYear2013
Sun Nov 3 23:59:00 EST 2013