• This RSS feed has been working without issue for years. Starting yesterday, though, there seems to be an issue with the LastBuildDate. Today for instance it shows: <lastBuildDate>Fri, 29 Sep 2023 05:23:14 +0000</lastBuildDate> which is 10:23?PM?Thursday, Pacific Time (PT). The site’s time zone is set to “Los Angeles” = Pacific Time.

    The pub dates on the rss items are showing correctly in the feed.

    We use the RSS feed to send out a daily email campaign through MailChimp using their RSS Feed template. MailChimp is only looking at posts from the day before, I think due to the LastBuildDate.

    I tried setting up a whole new RSS campaign in MailChimp in case there was an issue with the one we have been using and the issue persists.

    I also did a test RSS campaign in MailerLite and MailerLite pulls in the correct posts for today, but when I set the display options to show the publish date it is showing yesterday’s date 2023-09-28 for each item.

    I’m not using a custom feed but I am pulling in custom fields to the RSS field through functions.php and that is still working.

    The feed validates:

    https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fwww.schwartzreport.net%2Ffeed%2F

    How can I get this feed to show the correct LastBuildDate and time?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter balex66

    (@balex66)

    Scratch that part about MailerLite. It was showing the published date of the items in preview as 2023-09-28, but when I sent out a test email the date was correct. So I still can’t figure out why MailChimp is a day behind when it looks at the feed. Even when I create a whole new campaign.

    Thread Starter balex66

    (@balex66)

    Here is the full code in the channel section at the top of the feed the frequency looks to be set hourly but the build date doesn’t seem to refresh:

    <channel> <title>Schwartzreport</title> <atom:link  rel="self" type="application/rss+xml" /> <link>https://www.schwartzreport.net/</link> <description>Trends That Will Affect Your Future</description> <lastBuildDate>Fri, 29 Sep 2023 05:23:14 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod> hourly </sy:updatePeriod> <sy:updateFrequency> 1 </sy:updateFrequency>
    Moderator bcworkz

    (@bcworkz)

    The lastBuildDate value should be the date-time of the most recently modified post from the current global WP_Query object. The time is in UTC so it doesn’t matter what time zone your server is in. If you have not published or updated any posts, the lastBuildDate would not be expected to change.

    If you are not getting expected behavior, it’s possible your theme or a plugin is altering behavior for some unknown reason. The lastBuildDate value comes from get_feed_build_date('r'). It is possible to alter the returned value through a filter hook of the same name. You could query for the post whose date-time would be the right one and use it in the filter callback. You should add your callback with a large $priority arg so it has the final say over what your theme or plugins might be doing.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘RSS Feed lastBuildDate issue’ is closed to new replies.