Java SimpleDateFormat throwing ParseException: Unparseable date on Windows but not on Mac [duplicate]
问题 This question already has answers here : Java - Unparseable date (2 answers) java.text.ParseException: Unparseable date: “01:19 PM” (6 answers) Closed 4 months ago . I have the following method: public static Date convertFromWowInterface(String wowinterfaceFormat){ Date date = null; try { SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd-yy hh:mm a"); date = dateFormat.parse(wowinterfaceFormat); } catch (ParseException e) { e.printStackTrace(); } return date; } The string being passed