How to convert string to timestamp ? For example, I have string:
2012-06-10T10:00:00+04:00
I tried following in AWS node js lambda function (so mostly like js) and worked fine.
var arrivalTime='2012-06-10T10:00:00+04:00';
var d = new Date(arrivalTime);
console.log('This is -> d ' + d.toString());
For node js lambda the only issue is it always returns UTC so conversion is needed but for js (i.e. on client side) it would return in local time I'd think.