Any ideas why the followng fails on Android 2.2...
java.text.ParseException: Unparseable date: 2011-02-16 11:38:03.328 UTC
...while it works fine on a sun JRE 1.6 ?
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S z");
try
{
Date date = dateFormat.parse("2011-02-16 11:38:03.328 UTC");
}
catch (ParseException e)
{
e.printStackTrace();
}
As mentioned ion Comment, can make the test even simpler:
new SimpleDateFormat("z").parse("UTC")
This throws a parse exception. I am using a nexus one device, android 2.2