I'm reading a from a few RSS sites which don't send the typical:
- iso representation
2019-06-12T07:17:47Z
-Instant.parse()
can be used
- RFC1123
Wed, 12 Jun 2019 03:17:47 -0400
-DateTimeFormatter.RFC_1123_DATE_TIME.parse()
can be used
Instead I'm getting these strings:
Tue, 25 May 2021 00:00:00 EDT
03 Jun 2021 18:35:00 HKT
I've already tried around with some custom patterns and the ZonedDateTime + OffsetDateTime parse()
method. Although I haven't found a way to get a date time representation that I can convert into Instant
. Neither do I control the source and can fix the output format.
How can I be more lenient and parse these date times?