-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Proposer
ODI
Use Case
The startTime and endTime of the schedule are currently underspecified, but in practice we recommend they are rendered into the feed in the local time of the associated location (rather than UTC).
This requires the data user to look up the timezone based on the geo lat/lng of the location (which is optional, and the Event may only include a free-text address field at a minimum), in order to resolve the time. As an aside: resolving time from location is not always possible depending on the geography (e.g. the West Bank has two timezones in the same location), so this is inherently flawed.
Further related issues:
- Fix date/time recommendation realtime-paged-data-exchange#91
startTime/endTimetimezone validation data-model-validator#278- Adding Schedules schemaorg/schemaorg#1457 (comment)
As explained here timezones are difficult to calculate, so we should steer away from anything that requires embedding of the specific rules of a timezone. iCal does this using TZID.
Proposal
The Schedule should include a new required property named timeZone, to mirror the iCal TZID (and this should be recommended for inclusion in the schema.org pending implementation too).
The property should be constrained to the values of TZ from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
This also means that it will be natively supported by libraries such as moment.js.
Additionally from this discussion we should mandate that DateTime properties such as startDate and endDate MUST include timezone designator and SHOULD default to the local timezone of the Event (as per unresolved item in #78).
Validator rules
timeZoneis required withinScheduletimeZoneis required withinPartialScheduleif eitherstartTimeorendTimeare set
Example
"eventSchedule": [
{
"type": "PartialSchedule",
"repeatFrequency": "P1W",
"startTime": "20:15",
"endTime": "20:45",
"timeZone": "Europe/London",
"byDay": [
"http://schema.org/Tuesday"
]
}
],
Beta property
| (Class) Property | Expected Type | Description |
|---|---|---|
(pending:Schedule) beta:timeZone |
schema:Text |
The time zone used to generate occurrences, same as iCal TZID. E.g. 'Europe/London'. |