Google站长工具提示JSON-LD事件startDate非ISO 8601格式错误求助
问题原因与解决方案
错误原因
你写的startDate和endDate里的时区部分完全无效:
- 你的值是
"2023-09-16T15:30-16:30",其中-16:30超出了ISO 8601规定的时区偏移范围(合法范围是-12:00到+14:00),而Google示例里的-05:00是符合规范的有效偏移。 - 你明显混淆了事件结束时间和时区偏移:
startDate只需标记事件开始的时间+对应时区,结束时间应单独放在endDate字段,不能跟在startDate的时间后面。
修正后的代码
针对英国斯特拉特福的时区(夏令时UTC+1,冬令时UTC+0),修正后的JSON-LD代码如下:
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Event", "name": "Think Big", "startDate": "2023-09-16T15:30+01:00", "endDate": "2023-10-21T15:30+01:00", "eventStatus": "https://schema.org/EventEventScheduled", "eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode", "location": { "@type": "Place", "name": "Methodist Church", "address": { "@type": "PostalAddress", "streetAddress": "Old Town", "addressLocality": "Stratford-Upon-Avon", "postalCode": "CV37 6BG", "addressRegion": "Warwickshire", "addressCountry": "GB" } }, "image": [ "[removed]" ], "description": "Confidence boosting workshops for the Shyer Child (for ages 8-9)", "organizer": { "@type": "Organization", "name": "The Beehive, Stratford-Upon-Avon", "url": "[removed]" } } </script>
额外说明
- 若不想手动处理夏令时/冬令时的偏移,也可以直接用UTC时间(后缀加
Z),比如"2023-09-16T14:30Z"(对应英国夏令时15:30)。 - json-ld.org/playground仅做语法校验,不会检查时区偏移的有效性,因此没报错,但Google的工具会严格校验ISO 8601的合规性。
内容的提问来源于stack exchange,提问作者Harry
相关产品推荐
相关产品推荐

