0

I am trying to parse pubDate from rss into DateTime object.

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

This throws error

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

Kshitij Dhakal
  • 816
  • 12
  • 24

1 Answers1

0

Changed to

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

from the documentation.

Kshitij Dhakal
  • 816
  • 12
  • 24