You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RFC3339 year 0000 rejected by date-time format validation #1465
Validation of the date-time format rejects timestamps containing year 0000, even though the RFC3339 grammar allows any four-digit year.
Example timestamp:
0000-01-01T00:00:00Z
Context
During interoperability testing of JSON Schema date-time format validation across multiple implementations, I observed that this value is accepted by several validators but rejected by python-jsonschema. Further investigation suggests the behavior originates from the rfc3339-validator dependency used internally for date-time checking.
Specification Reference
RFC3339 defines the year component using the following grammar:
The validator raises a ValidationError, indicating the instance is not considered a valid date-time.
Expected Behavior
The timestamp should be accepted as syntactically valid according to the RFC3339 grammar.
Cross-Implementation Observation
During interoperability testing:
Hyperjump JSON Schema accepts the timestamp.
jsonschema-rs accepts the timestamp.
python-jsonschema rejects the timestamp when format validation is enabled.
Direct calls to rfc3339-validator also reject the timestamp.
This indicates that the behavior likely originates from the underlying RFC3339 validation library used by the Python stack.
Possible Cause
The underlying validation library appears to reject year 0000, possibly due to limitations in date parsing logic or assumptions about supported calendar ranges.
Question
Is this behavior intentional, or would it be preferable for date-time validation to align strictly with the RFC3339 grammar? If the limitation originates in the underlying dependency, clarification in documentation may help users understand the behavior.
The validation succeeds without raising a ValidationError.
It looks like this may have been resolved by a recent jsonschema release or by one of its dependencies. If there is a specific older version or environment where the issue still occurs, I'd be happy to test that as well.
Activity
Kirera-Wainaina commentedon Mar 23, 2026
I'm using the most recent version of
jsonschemaand it doesn't seem to be raising the error. Any more details you can share?divyaprakashdev commentedon Jun 25, 2026
Verified on jsonschema 4.26.0 with Python 3.14.5.
I couldn't reproduce this on the latest release.
The validation succeeds without raising a
ValidationError.It looks like this may have been resolved by a recent
jsonschemarelease or by one of its dependencies. If there is a specific older version or environment where the issue still occurs, I'd be happy to test that as well.