3

When doing a startDate in Schema.org, should we use our local time or UTC time?

For instance, I have the following Microdata. The content of the startDate is in UTC (which we represent with an offset of +00:00 or just Z as in my example) whereas the human readable aspect is in Pacfic Standard Time. I suspect this is correct, though I would like clarification and have not found relevant documentation. Do we put the microdata timezone in UTC or in our local timezone?

<ul class="list-unstyled" itemtype="http://schema.org/Event" itemscope="">
    <li itemprop="name"><strong>Internet Security</strong></li>
    <li itemprop="startDate" 
        content="2015-09-09T00:00:00.0000000Z">Tue 08 Sep, 5:00 PM
     </li>
    <li itemprop="description">Keep your online accounts secure.</li>
    <li itemprop="location" itemscope="" itemtype="http://schema.org/Place">
        <span itemprop="name">Program Room</span>
        <address itemprop="address">
            Salt Spring Island Public Library
        </address>
    </li>
</ul>

I know that the date ought to be in ISO 8601 format, though as far as I know, this format can be in any timezone. Which do we choose? UTC or something specific to our locality such as -08:00 for pacific standard time?

Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
  • I don't know much about it but reading [this](https://html.spec.whatwg.org/multipage/infrastructure.html#global-dates-and-times) it seems you just have to add the [time-zone-offset](https://html.spec.whatwg.org/multipage/infrastructure.html#valid-time-zone-offset-string) as the fourth item of your date string. So I'd say that it would make more sense to fill everything in local timezone – Kaiido Sep 24 '15 at 02:34
  • [This documentation](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-global-date-and-time-string) cleared up the confusion for me. Maybe it will help others too. Example: `1984-01-24T12:00-08:00` would be noon in PST, while `1984-01-24T12:00` would be noon in UTC. The trailing `+` or `-` time offset specifies the time zone. If omitted, UTC is default. – Mentalist Nov 26 '21 at 01:24

1 Answers1

1

Note that the li element can’t have a content attribute in HTML5+Microdata (related answer). You should use the time element and its datetime attribute instead (or the meta element if the date should not be visible on the page).

As you note, Schema.org expects the date to be in ISO 8601 format, which allows both variants (with and without time zone). As they don’t give any further restrictions, specifying the time zone (of your choice) is optional.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • 1
    Given that schema.org does not expect a timezone, how will search engines know the time zone to render? I suspect I just specify the timezone of my choice, and use the one most relevant to my event. I.e. for an international audience, use Utc, for a local audience, use the local zone. – Shaun Luttin Sep 24 '15 at 02:51
  • 1
    @ShaunLuttinu: I’d guess this depends on the specific consumer of your data. -- Google, for example, documents how the `startDate` property should be used if you want to get their [Event Rich Snippet](https://developers.google.com/structured-data/rich-snippets/events): they don’t specify the time zone in their example; nor do they mention it at all. Maybe they deduce the relevant time zone to show depending on event location and/or what they know about their current user. -- Unless you have strong reasons not to, I’d always include the time zone. – unor Sep 24 '15 at 03:02
  • I am thinking it best to put the microdata in the same timezone as the human readable text. That helps to rule out any ambiguity. For instance, in my example, I would put the timezone as `-07:00` to indicate Pacific Standard Time. – Shaun Luttin Sep 24 '15 at 04:19