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

fix(prost-types): Parse timestamp with long second fraction #1106

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

caspermeijn
Copy link
Collaborator

chrono is able to parse timestamps which are more precise then nanoseconds. We can also do that but truncating the digits.

`chrono` is able to parse timestamps which are more precise then nanoseconds. We can also do that but truncating the digits.
@caspermeijn
Copy link
Collaborator Author

@mumbleskates I found this one while fuzzing against chrono

@mumbleskates
Copy link
Contributor

nice! i haven't gotten around to looking at Duration yet but i was thinking about doing it this weekend, eager to take a look.

@mumbleskates
Copy link
Contributor

oh i see you're also parsing directly with chrono! i will try that also.

@mumbleskates
Copy link
Contributor

Hmm. What fuzzing condition did you enforce with this? There are so many differences between how this library parses dates (esp. the year) and how chrono does it that it's hard to assert that we parse a superset. did you just check that strings that parse with both libraries are equivalent?

@caspermeijn
Copy link
Collaborator Author

This is the fuzzing test I executed: caspermeijn@8dd7f4a
I will PR that at a later time, as fuzzing is currently broken on master: #1107

@caspermeijn caspermeijn added this pull request to the merge queue Jul 20, 2024
Merged via the queue into tokio-rs:master with commit 1076101 Jul 20, 2024
16 checks passed
@caspermeijn caspermeijn deleted the parse_nanos branch July 20, 2024 14:57
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