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

Time's "large-dates" feature should be optional #475

Open
dennisorlando opened this issue Jun 3, 2024 · 2 comments
Open

Time's "large-dates" feature should be optional #475

dennisorlando opened this issue Jun 3, 2024 · 2 comments
Assignees
Labels
tracked-in-jira Ticket filed in Mongo's Jira system

Comments

@dennisorlando
Copy link

Hi,
when parsing a time::PrimitiveDateTime, the program's execution changes when the "large-dates" feature is enabled, due to some ambiguities when parsing a datetime.
bson has such feature enabled by default, thus potentially modifying how a program works.
In our case, we got some panics which we didn't know where they came from.

Would it be possible to remove the "large-dates" feature from time and perhaps make it optional?

@abr-egn
Copy link
Contributor

abr-egn commented Jun 4, 2024

We enable the large-dates feature because part of the bson test corpus includes dates in the Y10k+ range; I do think you make a good case for making that optional when it's guaranteed that inputs won't have years that large.

Unfortunately, removing the feature at this point would be a breaking change, so I've filed https://jira.mongodb.org/browse/RUST-1960 for it to be included in version 3.0 of the bson crate.

@abr-egn abr-egn added tracked-in-jira Ticket filed in Mongo's Jira system and removed triage labels Jun 4, 2024
@dennisorlando
Copy link
Author

Updates: this is also getting addressed at time-rs/time#709, which might provide you a solution which is not breaking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracked-in-jira Ticket filed in Mongo's Jira system
Projects
None yet
Development

No branches or pull requests

2 participants