I try to parse this date "Wed Jul 12 2023 23:58:20 GMT+0000 (Coordinated Universal Time)" using this code
val sdf = SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss ", Locale.getDefault())
val time = try {
val mDate = sdf.parse(input)
mDate!!.time
} catch (e: ParseException) {
-1
}
But I get this error
Unparseable date: "Wed Jul 12 2023 23:58:20 GMT+0000 (Coordinated Universal Time)"