{"id":1347162,"date":"2017-09-09T12:04:19","date_gmt":"2017-09-09T19:04:19","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/"},"modified":"2017-09-09T12:04:19","modified_gmt":"2017-09-09T19:04:19","slug":"google-structured-data-and-time-offset-2","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/","title":{"rendered":"Google Structured Data and Time Offset"},"content":{"rendered":"<p>I am following up on this <a href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset\/\">post<\/a> to see if and where it is at on the radar.<\/p>\n<p>As mentioned in the previous discussion, the issue is present on the demo site. Run these two events through the <a href=\"https:\/\/search.google.com\/structured-data\/testing-tool\">Structured Data Testing<\/a> tool and you will clearly see the issue.<\/p>\n<p>http:\/\/wpshindig.com\/event\/an-example-event-by-sir-rob\/<br \/>\nhttp:\/\/wpshindig.com\/event\/eventbrite-tickets-demo-event\/<\/p>\n<p>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.<\/p>\n<p>My new snippet abandons the use of TEC&#8217;s Tribe__Date_Utils in favor of PHP&#8217;s datetime class. Also, instead of outputting it in ISO-8601 format, I went with the local timezone format. This is mentioned on <a href=\"https:\/\/developers.google.com\/search\/docs\/data-types\/events\">Google&#8217;s<\/a> 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.<\/p>\n<p>So here&#8217;s the new revised snippet.<\/p>\n<p><code><\/p>\n<p>function tribe_modify_json_ld_event_dates ( $_data, $args, $event ) {<\/p>\n<p>\/\/\tMove away from TEC Date Util using local timezone, like Ticketmaster and Google.<br \/>\n\t$_data-&gt;startDate = date_create( tribe_get_start_date( $event-&gt;ID, true, DateTime::ATOM ) )-&gt;setTimezone( new DateTimeZone( 'America\/Chicago' ) )-&gt;format( \"Y-m-d H:i\" );<br \/>\n\t$_data-&gt;endDate = date_create( tribe_get_end_date( $event-&gt;ID, true, DateTime::ATOM ) )-&gt;setTimezone( new DateTimeZone( 'America\/Chicago' ) )-&gt;format( \"Y-m-d H:i\" );<\/p>\n<p>    return $_data;<br \/>\n}<br \/>\nadd_filter( 'tribe_json_ld_event_object','tribe_modify_json_ld_event_dates', 10, 3 );<\/p>\n<p><\/code><\/p>\n<p>Back to the original question. Is this on the radar still?<\/p>\n","protected":false},"template":"","class_list":["post-1347162","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Google Structured Data and Time Offset -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Google Structured Data and Time Offset -\" \/>\n<meta property=\"og:description\" content=\"I 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, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/\",\"name\":\"Google Structured Data and Time Offset -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-09-09T19:04:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Google Structured Data and Time Offset\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Google Structured Data and Time Offset -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/","og_locale":"en_US","og_type":"article","og_title":"Google Structured Data and Time Offset -","og_description":"I 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, [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/","name":"Google Structured Data and Time Offset -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-09-09T19:04:19+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/google-structured-data-and-time-offset-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Google Structured Data and Time Offset"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1347162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1347162\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1347162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}