w3stling/rssreader

Problems with some special date time format(s)

hillgert opened this issue · 2 comments

Getting IllegalArgumentException when a feed provides the item date with this special format. I do not have found a simple way to provide a specific date time format to handle this formatting aspect.

Would be nice to have some access points to enhance the API to use/handle additional formats.

Exception in thread "main" java.lang.IllegalArgumentException: Unknown date time format 2023-02-28T17:37:08.823050+00:00
at com.apptasticsoftware.rssreader.DateTime.toZonedDateTime(DateTime.java:174)
at com.apptasticsoftware.rssreader.DateTime.toEpochMilli(DateTime.java:353)
at java.base/java.util.Optional.map(Optional.java:260)
at com.apptasticsoftware.rssreader.util.ItemComparator.lambda$newestItemFirst$1(ItemComparator.java:32)

I agree that it would be nice to be able to pass in a custom timestamp formatter. I will look into adding it in a future release.

For now I have added support for this timestamp format. Fixed by #94 and included in v3.4.5 release.

Seems to work fine for me :).