使用 ical4j 1.0.6,我试图从“DTSTART ...”字符串中实例化一个 DateTime。即使对于DateTime 文档和ical4j wiki中列为有效的示例,构造函数也会抛出ParserException
String date = "DTSTART;TZID=US-Eastern:19970714T133000";
try {
DateTime dt = new DateTime(date);
} catch (ParseException e) {
e.printStackTrace(); //always thrown
}
java.text.ParseException: Unparseable date: "DTSTART;TZID=US-Eastern:19970714T133000" (at offset 0)
我尝试将 KEY_RELAXED_PARSING 设置为 true,但无济于事。
我究竟做错了什么?