Home › Forums › Calendar Products › Events Calendar PRO › Google search displays incorrect event date
- This topic has 7 replies, 4 voices, and was last updated 8 years, 4 months ago by
Alain.
-
AuthorPosts
-
June 26, 2017 at 12:48 pm #1307256
Alain
ParticipantHi 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.
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/June 28, 2017 at 1:49 pm #1310614Courtney
MemberHello 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 🙂June 28, 2017 at 8:48 pm #1311048Mathew
ParticipantAlain,
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 resultsfunction 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.
June 29, 2017 at 6:55 am #1311846Alain
ParticipantThanks a lot Mathew. It works!
June 29, 2017 at 9:32 am #1312100Courtney
MemberThanks Matthew and Alain!
Courtney 🙂November 2, 2017 at 7:50 pm #1374309Victor
MemberHi 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,
VictorNovember 24, 2017 at 8:36 am #1390805Support Droid
KeymasterHey 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 ‘Google search displays incorrect event date’ is closed to new replies.
