How to convert iso date string (2015-11-18T20:00:00Z) to local time

Bhargava4
Mega Expert

How to convert iso date string (2015-11-18T20:00:00Z) to local time

6 REPLIES 6

i used the below script , its working good



var timeInStart = current.u_on_call_start;


  var dateTimeStart = timeInStart.split('T');


  var dateStart = dateTimeStart[0];


  var timeStart = dateTimeStart[1].split('Z');


  t =   dateStart + " " + timeStart[0];


  var start = new GlideDateTime(t);


      var plannedStartDt = new GlideDateTime(start);


              z =   plannedStartDt; * converted Local Date Time *


This is the way. Thank you!