I've got my Event Card approved and working. The card in Gmail shows the correct time (10pm Berlin, DE) but on the Google calendar it shows as 7am.
When I create the card I convert the date from Berlin to UTC and return the date in ISO 8601 format:
$dt = new \DateTime($dateString, new \DateTimeZone($this->timezone ?? \Phpr::$config->get('TIMEZONE')));
$dt->setTimezone(new \DateTimeZone("UTC"));
return $dt->format("c");
and this is the resulting markup:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EventReservation",
"reservationNumber": "2400071",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "Some dude's name"
},
"reservationFor": {
"@type": "Event",
"name": "Demo Event Flux (1)",
"startDate": "2022-05-07T22:00:00+10:00",
"endDate": "2022-05-08T03:00:00+10:00",
"url": "https://www.yyy.zzz/event/demo-event-fl-1",
"location": {
"@type": "Place",
"name": "Berlin Central Station",
"address": {
"@type": "PostalAddress",
"streetAddress": "Europaplatz 1",
"addressLocality": "Berlin",
"addressRegion": "Berlin",
"postalCode": "10557",
"addressCountry": "DE"
}
}
}
}
</script>
I'm not sure, but seems that this is a Calendar problem, not a schema problem. Maybe Calendar doesn't have enough information to know the precise timezone? Maybe my conversion is wrong.
Has this happened to you? Thanks
