I am using momentjs in alloy framework in Appcelerator. My api returns the date as - 2017-09-06T12:03:00.000Z
I am using below code to format this date into readable form -
var dt = moment(record.createddate);
$.dateValue.text = moment(dt).format('lll');
But the output I get is - Sep 6, 2017 5:33 PM
, which is not correct as the date saved in db and returned from api is EST and the date getting displayed is GMT+0530
. How should i format this date so that I get the correct date value?