I had a problem where nodes created from the feed I was accessing, were getting the current time rather than the one in the feed. I tracked it down to _parser_common_syndication_atom10_parse():
$timestamp = strtotime("{$news->published}");
if ($timestamp === FALSE) {
$timestamp = time();
}
What I saw was that even with an ATOM 0.3 feed, it was using this function to parse, and the feed used the element "issued" to store date/time rather than "published".
I changed this small section of code as follows:
$timestamp = strtotime("{$news->published}");
if ($timestamp === FALSE) {
// try issued field
$timestamp = strtotime("{$news->issued}");
if ($timestamp === FALSE) {
$timestamp = time();
}
}
And that worked.
Since there is no ATOM 0.3 function, it may make sense to do this and have the code look for "issued" in the event that it does not find "published". And then if it finds neither, use the current time.
Again this works for me and suits my needs, if it makes sense for everyone then perhaps it can be made permanent.
Comments
Comment #1
aron novakIt's fixed. Please make sure that the items at the feed that you use, now really has the correct date. It's fixed for both 5.x and 6.x.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.