I am trying to convert datetime from the server in the form of JSON to something I can use in HighChart but I keep getting the wrong day.
var json = {"lastMinute":"2013-05-06 15:46:00"}; // GMT
var lastMinute = json.lastMinute;
var a = lastMinute.split(' ');
var d = a[0].split('-');
var t = a[1].split(':');
var date = new Date(d[0],d[1],d[2],t[0],t[1],t[2]);
// NEED TO CONVERT TO LOCALTIME
this outputs: Thu Jun 06 2013 15:46:00 GMT-0700 (PDT)
can someone put my out of my misery and tell me what stupidly simple thing I'm doing wrong?