RFC822 Timezone Parsing in Java
Posted
by Jamen
on Stack Overflow
See other posts from Stack Overflow
or by Jamen
Published on 2010-05-12T23:15:58Z
Indexed on
2010/05/12
23:24 UTC
Read the original article
Hit count: 151
Hi,
I have a JS date that is being converted by Dojo into RFC822 format. The function call - dojo.date.toRfc3339(jsDate), generates the following date - 2007-02-26T20:15:00+02:00.
I have an application that uses a Java date SimpleDateFormat to parse in the dates generated above. I am having problems parsing this date format due to the timezone. I have attempted to use
yyyy-mm-DD'T'hh:mm:ssZ
This fails as the 'Z' for timezone doesn't expect a ':' character. Does anyone know how I would specify a pattern to handle a RFC822 date with the ':'?
Thanks Jamen
© Stack Overflow or respective owner