2
votes

I'm busy parsing the following date: Tue Jun 19 10:06:19 2012

I use http://docs.oracle.com/javase/1.5.0/docs/api/java/text/SimpleDateFormat.html for this. With the following format: EEE MMM dd HH:mm:ss yyyy

I would say this is alright, even when I take a look at the manual, but I keep getting exceptions with as message: Unabled to parse date Unparseable date: "Tue Jun 19 10:06:19 2012"

Can anyone help me? Thank you in advance!

1

1 Answers

2
votes

I found the solution, it had something to do with the locale (which was not set), this works just fine:

 SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy", Locale.US);