brandur / json_schema

A JSON Schema V4 and Hyperschema V4 parser and validator.
MIT License
230 stars 45 forks source link

Fix valid timezone designators not being accepted. #121

Closed chrisgavin closed 3 years ago

chrisgavin commented 3 years ago

According to the JSON schema specification, "date-time" formatted strings should be represented in ISO8601 format. ISO8601 allows time zone offsets of the form ±hh:mm, ±hhmm and ±hh, but currently only the first of those formats is supported.

This pull request updates the regex for date-times so that the latter two timezone formats are also accepted.

chrisgavin commented 3 years ago

Ah apologies @aibaars. I had not realized that only a subset of ISO8601 was supported!