Time should be sent in this format
"2023-01-09T10:45:00.000+05:30"
and the String which i have to parse into datetime is only "10:00 AM" i tried doing this
var GMTdateFormat = DateFormat('yyyy-MM-ddHH:mm:ss.000+05:30').format(
DateTime.parse(
(state as SlotRequestPopUpDataLoadedState)
.slotStartTimingList
.where((element) => element.isSelected == true)
.map((e) => e.name)
.toString(),
).toUtc(),
);
But it is not working
try this: