I am new to react native ,I am trying to convert the given time "14:58" to utc in 24 hrs format. I am using the code like this
let currentDate = new Date();
startDate = new Date(currentDate.getTime());
startDate.setHours(startTime.split(":")[0]);
startDate.setMinutes(startTime.split(":")[1]);
let startUTC = moment(startDate).utc();
console.log(startUTC)
I am getting the result like this "2023-03-23T09:28:58.638Z" which in 12 hrs clock. Is there any way to convert this in 24 hr.