I'm trying to parse this date
Thu, 15 Nov 2018 16:56:49 +0000
With this code:
Date date = null;
try {
SimpleDateFormat parser = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z");
date = parser.parse(xmlPullParser.nextText());
} catch (ParseException e) {
e.printStackTrace();
date = new Date(); //This is just a temporary workaround
}
java.text.ParseException: Unparseable date: "Thu, 15 Nov 2018 16:56:49 +0000"
I've already try this formats too
EEE, dd MMM yyyy HH:mm:ss sssZ
EEE, d MMM yyyy HH:mm:ss sssZ
EEE, d MMM yyyy HH:mm:ss Z
But obviously it doesn't work