Home › Forums › Calendar Products › Events Calendar PRO › RSS Timezone Issues
- This topic has 3 replies, 4 voices, and was last updated 7 years, 1 month ago by Daniel.
-
AuthorPosts
-
February 24, 2017 at 12:27 pm #1245445DanielParticipant
I’m admitting personal defeat and opening a ticket.
I’ve have perused every thread that I can find related to the timezone/RSS issue and still cannot seem to get this to work.
Here’s a narrative of what I’m trying to accomplish.
I have the Events feed displaying in a weekly email newsletter via Mailchimp. The dates and times are displayed correctly on the website. I have the WordPress timezone set to Central. I have the server timezone set to Central. I have ECP set to use the sitewide timezone (although I’ve tried it both ways). Yet, with all of this, the RSS feed still shows the events in UTC and, therefore, that’s how Mailchimp displays them.
To be clear, events that show from 9am to 4pm on the site are showing as 3pm to 10pm in the feed.
I’m at a loss as to how to handle this issue. Any help would be greatly appreciated.
February 27, 2017 at 4:28 pm #1246573NicoMemberHi there Daniel,
Thanks for getting in touch and sorry to hear about this issue. I can help you out 🙂
Just try this updated version of an old snippet I found in a previous reply:
/*
* The Events Calendar Filter for RSS Feed to Correct Pubdate
*/
add_filter( 'get_post_time', 'tribe_hijack_rss_date', 20 , 3 );function tribe_hijack_rss_date( $time, $d, $gmt ) {
global $post;// Don't interfere if this is not the events feed
if ( $post->post_type != Tribe__Events__Main::POSTTYPE || ! is_feed() || ! $gmt ) return $time;// Get time and timezone
$time = new DateTime( tribe_get_start_date( $post->ID, true, $d, null ) );return $time->format( $d );
}
Try pasting it in your theme’s (or child theme’s) functions.php file. To test this out reload the feed URL a couple of times as it has an aggressive caching.
Hopefully this will make things right,
Best,
NicoMarch 21, 2017 at 9:35 am #1257403Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘RSS Timezone Issues’ is closed to new replies.