Considering the following situation:
let record = "2020-04-01 13:33 PM UTC";
var local_date = moment(new Date(record)).format("MMM Do, YYYY h:mm A");
Above code returns invalid date.
But for the following situation:
let record = "2020-04-01 2:33 AM UTC";
var local_date = moment(new Date(record)).format("MMM Do, YYYY h:mm A");
it returns : Apr 1st, 2020 8:33 AM
Link to sandbox: https://codesandbox.io/s/happy-volhard-m1c7d
Any suggestions to solve this problem ?