Skip to content

Commit 6756426

Browse files
committed
Clarify that the time format shouldn't include leap seconds
1 parent b11ba1d commit 6756426

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

specs/jsonschema-validation.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,14 +402,23 @@ Date and time format names are derived from
402402
format is from ISO 8601 as formalized into ABNF by RFC 3339 Appendix A.
403403

404404
- *date-time*: A string instance is valid against this attribute if it is a
405-
valid representation of the "date-time-ext" rule in RFC 9557
405+
valid representation of the "date-time-ext" rule in RFC 9557. This SHOULD
406+
allow and validate published leap seconds. See RFC 3339, section 5.7.
406407
- *date*: A string instance is valid against this attribute if it is a valid
407408
representation according to the "full-date" ABNF rule in RFC 3339
408409
- *time*: A string instance is valid against this attribute if it is a valid
409-
representation according to the "full-time" ABNF rule in RFC 3339
410+
representation according to the "full-time" ABNF rule in RFC 3339. This MUST
411+
NOT include leap seconds.[^3]
410412
- *duration*: A string instance is valid against this attribute if it is a valid
411413
representation according to the "duration" ABNF rule in RFC 3339 Appendix A
412414

415+
[^3]: The `time` format represents a time value that is independent of any
416+
specific date, such as a scheduled time of day or a measured duration. Because
417+
there is no date, it is not well suited for capturing a moment in time. For
418+
that, you would need `date-time`. Because `time` isn't for capturing a moment in
419+
time, leap seconds don't make sense because leap seconds only apply to
420+
specific dates. See RFC 3339, section 5.7.
421+
413422
Implementations MAY support additional attributes using the other format names
414423
defined anywhere in that RFC. Implementations SHOULD NOT define extension
415424
attributes with any name matching an RFC 3339, RFC 9557, or ISO 8601 format

0 commit comments

Comments
 (0)