Home › Forums › Calendar Products › Events Calendar PRO › Issue with Timezones in Structured Data
- This topic has 10 replies, 6 voices, and was last updated 8 years, 5 months ago by
Victor.
-
AuthorPosts
-
August 9, 2017 at 2:10 pm #1333103
Troy
ParticipantThe automated JSON-LD element created on our event pages are not being setup well for Google search results. We are in a UTC -10 timezone so if an event runs from Aug 4th 9:00 AM – 8:00 PM, the structured data created will be Aug 4th 7:00 PM – Aug 5 6:00 AM in UTC. This is causing some of our events to appear on the wrong day or a single day event to will be a two day event when it appears on Google.
To try and get around this, I have edited /common/src/Tribe/Timezones.php so it no longer converts $new_datetime to the UTC timezone but is there something in settings I can change so I don’t have to update the core file?
August 9, 2017 at 9:42 pm #1333264Cliff
MemberThis reply is private.
August 10, 2017 at 11:56 am #1333636Troy
ParticipantThis reply is private.
August 10, 2017 at 12:01 pm #1333640Troy
ParticipantThe file I changed was /wp-content/plugins/the-events-calendar/common/src/Tribe/Timezones.php
On line 281 I changed:if ( $new_datetime && $new_datetime->setTimezone( $utc ) ) {
to:
if ( $new_datetime ) {
I have tried the setting “Use the local timezones for each event” but the issue doesn’t go away.
August 10, 2017 at 3:48 pm #1333803Cliff
MemberThanks, Troy.
I now see this:
"startDate":"2017-08-12T19:00:00+00:00","endDate":"2017-08-13T03:00:00+00:00"So the JSON-LD is technically correct either way, but https://developers.google.com/search/docs/data-types/events does say it should be in the event’s local time, not forced to UTC (+00:00), so I have logged this as a bug internally.
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.
August 10, 2017 at 3:51 pm #1333804Cliff
MemberAh, and I found this reported elsewhere, too, actually.
You might want to try this fix: https://theeventscalendar.com/support/forums/topic/google-search-displays-incorrect-event-date-2/#post-1311048
If you do try it, please let me know how it goes for you.
August 10, 2017 at 11:35 pm #1333926Mathew
ParticipantTroy,
As a side note. Make sure that you revert or back out the changes you have made in the Timezones.php file prior to applying the code to the custom functions.php mentioned in the article.
Hope it helps.
August 11, 2017 at 10:36 am #1334185Cliff
MemberGood looking out, Mathew. Thanks! 🙂
September 2, 2017 at 9:35 am #1344090Support 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 TeamNovember 2, 2017 at 7:52 pm #1374317Victor
MemberHi There!
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 see if the fix works for your site. Don’t hesitate to open a new topic if anything comes up.
Best,
Victor -
AuthorPosts
- The topic ‘Issue with Timezones in Structured Data’ is closed to new replies.
