java.text.ParseException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • GitHub comment 72#151806482
    via GitHub by kiranboghra
    ,
  • Unparseable date error in android
    via Stack Overflow by Ayomide Aro
    ,
    • java.text.ParseException: Unparseable date: "2016-09-06 05:18:06.023 PM" (at offset 24) Weird part is that the device on which this exception has occurred is a friend's Nexus 5. However, if I debug this same string on my Nexus 5 / several other emulators, it works fine. Here is the code that I'm using. SimpleDateFormat belongs to java.text package. Date belongs to java.util package SimpleDateFormat formatGMT = new SimpleDateFormat("yyyy-MM-dd KK:mm:ss.SSS a"); formatGMT.setTimeZone(TimeZone.getTimeZone("GMT")); try { date = formatGMT.parse("2016-09-06 05:18:06.023 PM"); } catch (ParseException e) { Crashlytics.log(Log.ERROR, "DB Insertion error", e.getMessage().toString()); Crashlytics.logException(e); e.printStackTrace(); } Here is the full stack trace. # Crashlytics - plaintext stacktrace Wed, 07 Sep 2016 03:37:44 GMT # Platform: android # Bundle Identifier: com.mypackage.app # Issue #: 306 # Date: 2016-09-06T17:18:04Z # OS Version: 6.0.1 # Device: Nexus 5 # RAM Free: 36.5% # Disk Free: 11% #0. Crashed: pool-3-thread-3: 0 0 0x0000000000000000 at java.text.DateFormat.parse(DateFormat.java:579) at com.mypackage.app.MyService$16$1.execute(MyService.java:1670) at io.realm.Realm$1.run(Realm.java:1187) at io.realm.internal.async.BgPriorityRunnable.run(BgPriorityRunnable.java:34) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

    Users with the same issue

    maxxi
    8 times, last one,
    Alexandru Popa
    1 times, last one,
    ivotje50
    33 times, last one,
    ajinkya_w
    15 times, last one,
    rube
    1 times, last one,
    41 more bugmates