Skip to content

Proposal: scheduleTimezone #197

@nickevansuk

Description

@nickevansuk

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:

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

  • timeZone is required within Schedule
  • timeZone is required within PartialSchedule if either startTime or endTime are 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'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    attn-chairbugIssues, e.g. incorrect formatting or markup in the specificationgladstoneproposalProposed changes to the specificationrequired-for-open-bookingThis update is required for the publishing of Open Booking API 1.0schema.orgIssues relating to schema.org

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions