Convert EDT timestamp to PST with regex / JavaScript -
a third party providing me edt time-stamp in following format: mm/dd/yyyy hh:mm for instance: '08/19/2013 11:31' i need convert pst javascript (same date time format) , have been looking on can't find info doing this.. if can me example code appreciate it. if wanted manually, can try following: split space, have date , time. split time ":" , split date "/". create new date() , provide right values in right order. subtract 3 hours using proper methods, recreate format. here's example of this: var est = "01/01/2014 02:31", finaldate, pst; finaldate = parsedatestring(est); finaldate.sethours(finaldate.gethours() - 3); pst = formatdate(finaldate); console.log(pst); function parsedatestring(str) { var datetime, date, time, datesplit, month, day, year, timesplit, hour, minute; datetime = est.split(" "); date = datetime[0]; time = datetime[1]; datesplit = date.split("/...