Skip to:

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3066 closed defect (bug) (fixed)

Feed Bugs <pubDate> Issue

Reported by: anirban789's profile anirban789 Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.2
Component: API - Feeds Keywords: has-patch
Cc: anirban@…


Hi there,

I had talked to Mailchimp support executive on why RSS feed campaign emails are not sending on scheduled time but test emails are working fine. We had posted twice in the forum but none of them sent from MailChimp. But they were working a week before.

After troubleshooting they told me that the possible reason behind it maybe the <pubDate> tag is not working properly. I've attached the screenshot. I've tested the feeds on of my other sites & they are all showing same <pubDate> tag highlighted yellow color.

Please help

Attachments (2)

Feed Validator Results.png (98.0 KB) - added by anirban789 7 years ago.
Feed Validator Screenshot
3066.diff (1.5 KB) - added by thebrandonallen 7 years ago.

Download all attachments as: .zip

Change History (10)

7 years ago

Feed Validator Screenshot

#1 @casiepa
7 years ago
"While this date-time value is formatted correctly, it either appears to be in the future"

Most probably an issue of a timezone difference.

This is a warning, not an error.

#2 @thebrandonallen
7 years ago

  • Component changed from Component - Forums to API - Feeds
  • Keywords reporter-feedback added
  • Priority changed from high to normal
  • Severity changed from major to normal

I'm fairly certain this is related to #2961, which has been fixed for 2.6 (now in beta).

@anirban789 Do you think you could change some code to match the highlighted line in [6059]?

#3 @anirban789
7 years ago

  • Cc anirban@… added

@thebrandonallen @casiepa thanks for your replies. I've changed the code as you mentioned @thebrandonallen but it seems to be not working. I checked again in feed validator and it showing same result!

7 years ago

#4 @thebrandonallen
7 years ago

  • Keywords has-patch added; reporter-feedback removed
  • Milestone changed from Awaiting Review to 2.6
  • Version changed from 2.5.12 to 2.2


This occurs because we're calling current_time( 'mysql' ) for the channel <pubDate>. This means we're using a localized timestamp to generate the RFC compliant timestamp.

WP sets the internal application time to GMT, which also means that the pubDate ends up with +0000 (GMT) as it's offset. This goes unnoticed for those of us whose server time is at or before GMT.

However, since those, such as the Australians, live in the future, Marty's brother and sister start disappearing, and bad things happen.

Attached patch fixes the date, even if you're in the future waiting for your Delorean's flux capacitor to reach 1.21 jigowatts. It also changes <pubDate> to the more appropriate <lastBuildDate>, and switches to using r as the date format.

See #WP9566, #WP39141

#5 @thebrandonallen
7 years ago

@anirban789 If you want to make the changes highlighted in attachment:3066.diff, you should be back up and running.

#6 @johnjamesjacoby
7 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 6318:

Feeds: Run for it, Marty!

Props thebrandonallen. Fixes #3066.

#7 @johnjamesjacoby
7 years ago

Related: We may be able to use actual dates for these, now that we have adequate last-active-time coverage.

Note: See TracTickets for help on using tickets.