The JavaDoc for DateTimeFormat (http://joda-time.sourceforge.net/api-release/index.html) says "Zone names: Time zone names ('z') cannot be parsed" I'm not an expert, but I think this is because there are duplicates in the three-character time zone abbreviations. The "C" in CST could be Central, or it could be China.
Whenever I need to read a zoned datetime, I use the zone id, "ZZZ". On Fri, Oct 15, 2010 at 12:41 PM, Dain Sundstrom <d...@iq80.com> wrote: > I'm having a problem parsing short timezones with the pattern 'zzz'. > For example, the following code throws an IllegalArgumentException: > > DateTimeFormatter formatter = DateTimeFormat.forPattern("HH:mm:ss zzz"); > formatter.parseDateTime(formatter.print(new DateTime())); > > > java.lang.IllegalArgumentException: Invalid format: "10:40:00 PDT" is > malformed at "PDT" > at > org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:683) > at > proofpoint.rep.whois.WhoIsParserTest.testTimeParser(WhoIsParserTest.java:19) > > > I'm using joda-time-1.6.2.jar > > Any idea what I'm doing wrong? > > Thanks, > > -dain > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > _______________________________________________ > Joda-interest mailing list > Joda-interest@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/joda-interest > ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Joda-interest mailing list Joda-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/joda-interest