RSS Timezone Issues

Home Forums Calendar Products Events Calendar PRO RSS Timezone Issues

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1245445
    Daniel
    Participant

    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.

    #1246573
    Nico
    Member

    Hi 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,
    Nico

    #1257403
    Support Droid
    Keymaster

    Hey 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

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘RSS Timezone Issues’ is closed to new replies.