Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDRIVER-5759 fix relaxed encoding of date after year 9999 #1772

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

kevinAlbs
Copy link
Collaborator

@kevinAlbs kevinAlbs commented Oct 17, 2024

Fix encoding of date after year 9999 to agree with the Extended JSON specification.

Verified with this patch build.

Background & Motivation

The extended JSON spec notes:

BSON 1.1 Type or Convention Canonical Extended JSON Format Relaxed Extended JSON Format
...
Datetime [year before 1970 or after 9999] {"$date": {"$numberLong": <64-bit signed integer giving millisecs relative to the epoch, as a string>}} <Same as Canonical Extended JSON>

Includes a regression test from mongodb/specifications#1676.

@kevinAlbs kevinAlbs marked this pull request as ready for review October 17, 2024 22:12
@kevinAlbs kevinAlbs requested a review from eramongodb October 17, 2024 22:16
@kevinAlbs kevinAlbs merged commit 0d1b5bc into mongodb:master Oct 21, 2024
42 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants