Hi,
I am trying to run such code:
String date = "Wed, 19 Jan 2011 10:15:34 -0800 GMT";
DateTimeParser[] parsers =
{
DateTimeFormat.forPattern("E, d MMM y HH:mm:ss Z z").getParser()
};
DateTimeFormatter inputFormatter = new
DateTimeFormatterBuilder().append(null, parsers).toFormatter();
try
{
DateTime calendar =
inputFormatter.withLocale(Locale.US).parseDateTime(date);
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
It returns:
Invalid format: "Wed, 19 Jan 2011 10:15:34 -0800 GMT" is malformed at "GMT"
If I drop that GMT and z, then it works ok. I checked this string and
format with standard (I mean JDK) SimpleDateFormat and there it works
with GMT and z.
Thanks for your time.
Regards,
Grzegorz Szpetkowski
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest