I have faced with something I do not understand. It's trivial operation (parsing string to date) but it does not take into account AM/PM, it always set AM.
Here is my example, when I parse startDate into Date it set AM for it (I expect PM).
String startDate = "Thu Apr 02 04:50 PM 2020";
SimpleDateFormat sdf = new SimpleDateFormat("E MMM dd HH:mm a yyyy");
Date date1 = sdf.parse(startDate);
System.out.println(date1.toLocaleString());
System output is
Apr 2, 2020 4:50:00 AM
What do I do wrong? Please advise.