did-resolution icon indicating copy to clipboard operation
did-resolution copied to clipboard

Define timestamp format carefully

Open aphillips opened this issue 3 months ago • 6 comments

DID Document Metadata https://www.w3.org/TR/did-resolution/#dfn-created

DID document metadata SHOULD include a created property to indicate the timestamp of the Create operation. The value of the property MUST be a string formatted as an XML Datetime normalized to UTC 00:00:00 and without sub-second decimal precision. For example: 2020-12-20T19:17:47Z.

The definition of created (shown here) defines the intended timestamp format. Several other metadata values (updated, nextUpdate) also use this sort of time stamp.

It would probably be a good idea to separately define the value and to improve the description for clarity. In particular, the operation "normalized to UTC 00:00:00" is undefined.

(Note: I do not have a quibble with the design. This is the right design.)

aphillips avatar Sep 22 '25 15:09 aphillips

@aphillips we discussed this on the call today. Does the Internationalization group have a recommended reference we could cite for this?

This has been defined in the VCDM - https://w3c.github.io/vc-data-model/#representing-time - which we could reference. But ideally, we would avoid introducing a normative dependency on the VCDM.

Also, we do not want to replicate this spec text in our spec.

Thanks

wip-abramson avatar Sep 25 '25 15:09 wip-abramson

This was discussed during the #did meeting on 25 September 2025.

View the transcript

Define timestamp format carefully #203

<ottomorac> w3c/did-resolution#203

ottomorac: this is about the timestamp format, etc...
… something about normalizing to UTC

WIp: I don't have many opinions on many of these i18n issues
… but we just need to address them for horiz review
… like, how do we even define the operation of normalizing to UTC?

<manu> https://w3c.github.io/vc-data-model/#representing-time

manu: we do have responses, like the one from VC DM, we should just point to that
… definitely not copy paste (it's too much text), but rerference

Wip: so we can just say 'as defined by VC DM'?

manu: danger here is pulling in a normative dependency on VC DM, which we don't want to do
… but there aren't normative statements in that section. so it wouldn't be a straight up dependency
… yeah, we should just point to this section

ottomorac: any volunteers?

WIp: I don't know if I want to do a PR, but I could write a comment -- do we have a section that you can reference, see what they say
… this seems like it has been solved by other specs


w3cbot avatar Sep 25 '25 19:09 w3cbot

I don't have a ready Normative reference. I believe VCDM created that text because there is not, AFAIK, a specific reference that does UTC normalization with no fractional seconds elsewhere. It's a permitted format in e.g. XMLSchema Datetime and it is the Right Thing To Do. It's just not formally defined.

As you note, taking a dependency on VCDM is not ideal. We should help you and other groups (including the VC folks) by making a reference in a foundational spec. In particular, I'd suggest adding this to Infra.

aphillips avatar Sep 25 '25 19:09 aphillips

This was discussed during the #did meeting on 16 October 2025.

View the transcript

w3c/did-resolution#203

ottomorac: This is related to the timestamp format

<ottomorac> We have a response back from Addison Phillips indicating that there is no normative reference for the date format.

Wip: I was confused about this.

Wip: Do we just reference the VCDM?

<manu> https://w3c.github.io/vc-data-model/#representing-time

manu: I think the best we could do is reference the VCDM, while being explict that we are not dependent of VCDM at all
… This is not as simple as we think it is. So we should address this
… Adding this to Infra is going to take a long time
… This is a part of WHATWG I think
… Getting this into infra would be a challenge
… I suggest we just depend on the minimal section of VCDM for now
… Deal with getting it into infra later

ottomorac: Is it a should or a must

manu: There is a MUST statement, so it would be a MUST pointing to the time representation in the VCDM


w3cbot avatar Oct 16 '25 16:10 w3cbot

Hmm, reviewing this further I am unsure how to proceed.

This is what we currently state, where datetime is defined by XMLSCHEMA

This datetime value MUST be normalized to UTC 00:00:00 and without sub-second decimal precision. For example: 2020-12-20T19:17:47Z.

The key point is we are state that datetime MUST be normalized to UTC.

We discussed referencing the VCDM spec on representing time: https://w3c.github.io/vc-data-model/#representing-time

But that section does not require that datetime is normalized to UTC or define how this normalization can be achieved.

all time values expressed in conforming documents SHOULD be specified in dateTimeStamp format, either in Universal Coordinated Time (UTC), denoted by a Z at the end of the value, or with a time zone offset relative to UTC

So I am not sure that referencing the VCDM spec is the right approach.

I do agree that somewhere in the DID resolution spec we should define datetime representations. Then reference that for all the properties that are datetime e.g.: created, updated, versionTime.

Perhaps we need our own Representing Time section?

Either that or we change the requirement for UTC normalization and rely on the VCDM text.

wip-abramson avatar Oct 20 '25 15:10 wip-abramson

This was discussed during the #did meeting on 11 November 2025.

View the transcript

w3c/did-resolution#203

wip: Madison is saying we need to define what we mean by datetime
… I was going to do that. So I looked at VCs and they don't normalize time

<pchampin> maybe https://www.w3.org/TR/timezone/ ?

joeandrieu: I think its the 00:00:00 which doesn't make sense. We normalize to UTC, not UTC 00:00:00

manu: we do say it should be specified datetime timestamp with Z.

<Wip> VCDM Representing Time section: https://w3c.github.io/vc-data-model/#representing-time

manu: we had this section (VC 2.0 section 5.8 representing time) and it survived internationalization review, so let's just use that

wip: I think that's fine. I'm happy to use it. That is a change to this normative statement.

manu: don't say "normalize"

pchampin: A recent comment in RDF working group. The term "normalized" doesn't not appear. "Adjust" does. Adjust hours/min.
… seeing the hours minute seconds, I see Joe's confusion
… we can just replace normalized with "adjusted"

wip: so, should we reference the VCDM section?

manu: Yes, it has lots of language that matters.

manu: we shouldn't repeat this much spec text

wip: my concern is that we are not requiring it uses UTC.

joeandrieu: VCDM doesn't care about UTC, but we do.

manu: good point

joeandrieu: we want to profile the VCDM with like "You must represent tiem as in VCDM and it must be adjusted to UTC 0"

wip: In the DID resolution spec, we have different properties that define time, versionTime, created, lastUpdated, etc. I think Jeffrey suggested we define our representation once and refer to that throughout.

wip: it might be better to have a time property that we reference in each property that is "time"

manu: this is section 4.3?

manu: Yeah. I think that's the right thing. Specify a datetime format and in that section, refer to VCDM and adjusted to UTC without subsecond decimal precision

wip: and where does that go in the spec?

manu: it could go anywhere. define it before you use it

wip: ok. great.

wip: marking ready for PR


w3cbot avatar Nov 11 '25 09:11 w3cbot