format: add RFC 3339 unknown local offset (-00:00) test for time#878
Open
Vaibhav701161 wants to merge 1 commit intojson-schema-org:mainfrom
Open
format: add RFC 3339 unknown local offset (-00:00) test for time#878Vaibhav701161 wants to merge 1 commit intojson-schema-org:mainfrom
Vaibhav701161 wants to merge 1 commit intojson-schema-org:mainfrom
Conversation
Signed-off-by: Vaibhav mittal <vaibhavmittal929@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a small but important test case for the
timeformat covering the unknown local offset representation defined in RFC 3339.Background
RFC 3339 (Section 4.3) explicitly defines the offset
-00:00as a valid representation indicating that the local offset is unknown. This is distinct fromZor+00:00, which represent a known UTC offset.While this distinction is subtle, it is part of the standard and appears in real-world data where the exact offset is not available but the time is still meaningful.
Current Situation
The existing test suite includes:
+05:30,-08:00)However, it does not currently include an explicit test for the
-00:00case.During local validation with multiple implementations (Hyperjump, python-jsonschema, jschon), I observed that:
This suggests that the behavior is not consistently handled across implementations, even though the RFC defines it clearly.
What This PR Adds
A single test case across relevant drafts:
{ "description": "time with unknown local offset (-00:00)", "comment": "RFC 3339 section 4.3", "data": "12:34:56-00:00", "valid": true }Why This Matters
format.