如何在 flutter 中解析来自 rss 的 pubDate?

How to parse pubDate from rss in flutter?

我正在尝试将 pubDate 从 rss 解析为 DateTime 对象。

String parseFormat = "ddd, dd MMM yyyy HH:mm:ss zzz";
this.pubDate = new DateFormat(parseFormat).parse(json['pubDate']);

这会引发错误

Trying to read ddd from Thu, 14 May 2020 09:40:15 EST at position 0

改为

String parseFormat = "E, dd MMM yyyy HH:mm:ss zzz";
this.pubDate = new DateFormat(parseFormat).parse(json['pubDate']);

来自 documentation.