I have a JavaScript
function that compares 2 dates. I am trying to format the dates properly but the Date
is subtracting 4 hours (presumably to compensate for GMT and EST), unnecessarily.
$.each(json.data, function(i, v) {
$.each(zoneObj, function(k, z) {
if (v.ptid == z.ptid) {
console.log(v.timeStamp);
var d = new Date(v.timeStamp);
console.log("datTime " + d);
I see that Date
is converting the v.timeStamp
to Easter Standard but that isn't necessary. How do I disable this?
I need to use Date
in order to take advantage of the getMonth
, getMinute
, etc. methods