Google search displays incorrect event date

Home Forums Calendar Products Events Calendar PRO Google search displays incorrect event date

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1307256
    Alain
    Participant

    Hi Stephen,

    I have a problem with Google Search Structured Datas. All the events on theatregranada.com are a day later than the actual date of the event.

    https://theatregranada.com/programmation/xavier-rudd/

    For exemple, this event is on July 13th but in Google Structured Data Testing Tool, the startdate is 2017-07-14T00:00:00+00:00.

    https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Ftheatregranada.com%2Fprogrammation%2Fxavier-rudd%2F

    Thanks for your help!

    ========================
    PLEASE LEAVE FOR SUPPORT
    Reporting the same issue as: https://theeventscalendar.com/support/forums/topic/google-search-displays-incorrect-event-date/

    #1310614
    Courtney
    Member

    Hello Alain

    My teammate, Cliff, actually responded to the thread you referenced clarifying that this is a known bug.

    Google is apparently not handling this properly.

    They are likely trimming the time and just displaying the date.

    I’ll mark this ticket as Pending Fix, which means this thread should receive a reply once the applicable fix has been released. I cannot guarantee when it will be fixed as it’s in the development team’s hands now. They need to assign it, code it, test it, and schedule it for release.

    I apologize for this issue and appreciate your understanding and patience.

    Likewise, I’ll flag this thread as an issue for you to be notified about. The only other suggestion I have might be a temporary work around. Rather than setting your timezone by UTC, could you switch to a city in your timezone settings and see if Google knows how to read that?

    Thanks
    Courtney 🙂

    #1311048
    Mathew
    Participant

    Alain,

    While waiting for an official fix, this snippet may help. I am using it with great success.

    Add it to your custom functions.php file.


    // Fix for UTC time offset issue in Google Structured Data Tool results

    function tribe_modify_json_ld_event_dates ( $_data, $args, $event ) {

    $_data->startDate = date_create( tribe_get_start_date( $event->ID, true, Tribe__Date_Utils::DBDATETIMEFORMAT ) )->setTimezone( new DateTimeZone( 'UTC' ) )->format( 'c' );
    $_data->endDate = date_create( tribe_get_end_date( $event->ID, true, Tribe__Date_Utils::DBDATETIMEFORMAT ) )->setTimezone( new DateTimeZone( 'UTC' ) )->format( 'c' );

    return $_data;
    }
    add_filter( 'tribe_json_ld_event_object','tribe_modify_json_ld_event_dates', 10, 3 );

    Hope this helps.

    #1311846
    Alain
    Participant

    Thanks a lot Mathew. It works!

    #1312100
    Courtney
    Member

    Thanks Matthew and Alain!
    Courtney 🙂

    #1374309
    Victor
    Member

    Hi guys!

    Just wanted to share with you that a new maintenance release (for the Week of 1st November 2017) is out, including a fix for this issue 🙂

    Find out more about this release → https://theeventscalendar.com/maintenance-release-for-the-week-of-1-november-2017/

    Please update the plugins and let us know if the fix works for your site.

    Best,
    Victor

    #1390805
    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 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Google search displays incorrect event date’ is closed to new replies.