Page 1 of 1

Unparseable date Exception

PostPosted: Wed Feb 08, 2012 3:21 am
by mike_metro
Can anyone assist with the following http://forum.serviio.org/viewtopic.php?f=20&t=4820. Someone is getting an error on the Escapist plugin and can't reproduce it. They are receiving an Unparseable date exception for "Wed, 01 Feb 2012 22:00:00 GMT". I am using Date.parse("EEE, dd MMM yyyy HH:mm:ss z", it.pubDate.text()). It seems to test fine on my Windows PC and Linux VM. Are there any localization or OS differences that could cause this issue?

Re: Unparseable date Exception

PostPosted: Wed Feb 08, 2012 12:31 pm
by zip
Looks like you'll have to provide US Locale to the date format instance

  Code:
new SimpleDateFormat(String pattern, Locale locale)

Re: Unparseable date Exception

PostPosted: Wed Feb 08, 2012 6:57 pm
by mike_metro
Thanks Zip. I'll try this when I get home.

zip wrote:Looks like you'll have to provide US Locale to the date format instance

  Code:
new SimpleDateFormat(String pattern, Locale locale)

Re: Unparseable date Exception

PostPosted: Sun Feb 12, 2012 7:08 pm
by mike_metro
Worked. Thanks Zip.