alexdebril / rss-atom-bundle

RSS and Atom Bundle for Symfony
MIT License
139 stars 49 forks source link

Custom date formats now longer applied #130

Closed benr77 closed 7 years ago

benr77 commented 7 years ago

Using v3.0.5 it appears that whilst you can specify a custom date format in the configuration, this is not applied to the underlying FeedIo/Rule/DateTimeBuilder therefore making the configuration change useless.

Is there now a different method for specifying custom date formats?

For reference my error is

InvalidArgumentException: Impossible to convert date : 2017-03-31 00:00:00 +0100 in /var/www/app/vendor/debril/feed-io/src/FeedIo/Rule/DateTimeBuilder.php:118
alexdebril commented 7 years ago

Hi,

Sorry I didn't answer before, but don't worry I didn't forget this. For date formats, I moved its detection in feed-io and I hoped that the list could be big enough to cover most cases. That's why I decided to remove date formats from configuration.

There is another solution : program a real date format detection, I'm now planning to do that soon. In the mean time, I will add the format you submitted in the list.

Thank you for your feedback

benr77 commented 7 years ago

Ok that's great thanks. If I remember correctly my issue was with parsing an RSS feed that didn't use the standard RSS date format - because it was a third-party feed I couldn't modify the date format in the feed itself.

So it would be useful to be also specify a custom date format to override the date format detection routine in case it does not correctly determine the date format - just to cover those cases where you have to work with a weird non-standard date format. Thanks

alexdebril commented 7 years ago

In #136 I restored debril_rss_atom.date_formats configuration. Are you able to test it in your project ?

to install the branch in your project, update composer.json as follow :

"debril/rss-atom-bundle": "dev-issue/130"

Thanks

iosipeld commented 7 years ago

I had the same issue and in my project it works OK and I think this option is useful to provide on master. Thanks.

alexdebril commented 7 years ago

OK I just merged it in the v3.0.9 release.

I assume the issue is fixed, feel free to re-open it if you need to.