Android SimpleDateFormat fails to parse datetime (works fine on sun 1.6 jre)
问题 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