I'm hopeless trying to parse a String to a Date but its not working. Could not be that hard? I'm doing it like this description: https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
String timestamp = "05 MAY 2017 15:20:26 UTC";
SimpleDateFormat sdf = new SimpleDateFormat("dd MMMMM yyyy HH:mm:ss z");
Date date = sdf.parse(timestamp);
But I'm still getting an error:
Exception in thread "main" java.text.ParseException: Unparseable date: "05 MAY 2017 15:20:26 UTC"
at java.text.DateFormat.parse(DateFormat.java:366)
at GetTime.main(GetTime.java:18)
What am I missing?