tribe_get_start_date() not working (or it was working in v2 and it’s not in v3)

Home Forums Calendar Products Events Calendar PRO tribe_get_start_date() not working (or it was working in v2 and it’s not in v3)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #57075
    Jeremy
    Participant

    The tribe_get_start_date() function seems to be working differently in v3. I have code that worked perfectly with v2 to create an RSS feed (with correct dates for events), but it’s not working since upgrading to v3. The date returned from tribe_get_start_date() in the loop is always UNIX epoch start “Thu, 01 Jan 1970 00:00:00 -0004”, so it’s not really picking up each event’s date at all. Any ideas?

    Here’s the page source:
    http://pastebin.com/zEiGqXm8

    Here’s the URL to that page’s output:
    http://bluemoonrehoboth.com/blog/today-at-the-moon-feed/

    #57084
    snorton
    Participant

    Change this line:
    echo mysql2date(‘D, d M Y H:i:s -0004’, tribe_get_start_date($post->ID, true, ‘Y-m-d H:i:s -0004’), false);
    to:
    echo tribe_get_start_date($post->ID, false, ‘Y-m-d H:i:s -0004’);

    #57085
    Jeremy
    Participant

    I’m sure this has something to do with recurring events. I know there have been lots of issues with this. I just need a way to get the date for the next upcoming event in the recurring event entry. As you can see from the code, I just need to output a feed that lists today’s events only, and they are usually going to be recurring events.

    #57093
    Jeremy
    Participant

    Ah thanks! That mysql2date() call was definitely screwing it up. That got me on track. Here’s what I ended up using so the pubDate is in the proper format:

    echo tribe_get_start_date($post, false, ‘D, d M Y H:i:s -0004’);

    Also, in case anyone from the future finds this, I have a couple actions registered that add the event start and end dates into the feed output in rss:ev and xCal formats. Here are those:

    http://pastebin.com/BE4rSW9H

    #58032
    Leah
    Member

    Thanks again for your help snorton, you rock!
    Jeremy, glad to hear things are working now.

    #980008
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘tribe_get_start_date() not working (or it was working in v2 and it’s not in v3)’ is closed to new replies.