View Single Post
  #8 (permalink)  
Old March 6th, 2016, 06:55 AM
Kees Kees is offline
Authorized User
Points: 89, Level: 1
Points: 89, Level: 1 Points: 89, Level: 1 Points: 89, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Default Date parsing exception

It surprises me that Android Studio does not raise that wrongthreadexception, i didnt try to run the same in studio.

Okay, i know what could cause the parsing error (if you didnt change the string in the line with simpledateformat).
Because the date string in the feed files now is for instance :
"2015-12-19T11:31:38.991Z",
so for all entries "yyyy-MM-dd'T'hh:mm:ss'.'SSS'Z'"
If you change that in the code :
SimpleDateFormat sdf =
new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss'.'SSS'Z'",
Locale.getDefault());

Hope this helps to read the dates!
Reply With Quote