Home › Forums › Calendar Products › Events Calendar PRO › Google Structured Data and Time Offset
- This topic has 6 replies, 3 voices, and was last updated 8 years, 5 months ago by
Mathew.
-
AuthorPosts
-
September 9, 2017 at 12:04 pm #1347162
Mathew
ParticipantI am following up on this post to see if and where it is at on the radar.
As mentioned in the previous discussion, the issue is present on the demo site. Run these two events through the Structured Data Testing tool and you will clearly see the issue.
http://wpshindig.com/event/an-example-event-by-sir-rob/
http://wpshindig.com/event/eventbrite-tickets-demo-event/Since the last discussion, my work-around stopped working as desired. I am not sure where the break occurred. I have since updated WordPress, PHP versions, and TEC. So I went back to the drawing board.
My new snippet abandons the use of TEC’s Tribe__Date_Utils in favor of PHP’s datetime class. Also, instead of outputting it in ISO-8601 format, I went with the local timezone format. This is mentioned on Google’s help. This also follows the format that Ticketmaster seems to be using. In research, Eventbrite uses the ISO format, but I had to choose one over the other.
So here’s the new revised snippet.
function tribe_modify_json_ld_event_dates ( $_data, $args, $event ) {
// Move away from TEC Date Util using local timezone, like Ticketmaster and Google.
$_data->startDate = date_create( tribe_get_start_date( $event->ID, true, DateTime::ATOM ) )->setTimezone( new DateTimeZone( 'America/Chicago' ) )->format( "Y-m-d H:i" );
$_data->endDate = date_create( tribe_get_end_date( $event->ID, true, DateTime::ATOM ) )->setTimezone( new DateTimeZone( 'America/Chicago' ) )->format( "Y-m-d H:i" );return $_data;
}
add_filter( 'tribe_json_ld_event_object','tribe_modify_json_ld_event_dates', 10, 3 );Back to the original question. Is this on the radar still?
September 11, 2017 at 2:06 pm #1347738Cliff
MemberHi again, Mathew.
Thanks for your snippets regarding this bug, and sorry it’s been outstanding so long.
I’ve pinged our development team in hopes that it receives some timely love.
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.
September 19, 2017 at 9:32 am #1351166Mathew
ParticipantThis reply is private.
September 19, 2017 at 7:19 pm #1351609Cliff
MemberThanks, Mathew. I’ll pass it along.
You’re also welcome to submit pull requests to https://github.com/moderntribe/the-events-calendar/
November 2, 2017 at 7:57 pm #1374320Victor
MemberHi Mathew!
You might already know about it, but I 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.
Thanks so much for being awesome and helping other users out!
Cheers!
VictorNovember 24, 2017 at 8:36 am #1390813Support 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 Structured Data and Time Offset’ is closed to new replies.
