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 fix #810

Merged
merged 3 commits into from
Aug 23, 2022
Merged

Time fix #810

merged 3 commits into from
Aug 23, 2022

Conversation

aardvark179
Copy link
Contributor

While investigating the time related failures on TruffleRuby I noticed that Unix times with offsets do not actually round trip correctly on MRI either. This PR creates times by using Time.at with nanoseconds and an offset, and avoids the precision issues of the old method. I've also added an assertion to the tests that the loaded object is equal to the one originally dumped out.

@ohler55
Copy link
Owner

ohler55 commented Aug 17, 2022

Looks like an invalid call was used.

@aardvark179
Copy link
Contributor Author

Ah, can't use rb_funcallv_kw on 2.5. Let's see how we do with a time creation function that definitely is in 2.5.

@ohler55 ohler55 merged commit 9e414b1 into ohler55:develop Aug 23, 2022
wintonpc added a commit to wintonpc/oj that referenced this pull request Aug 31, 2023
wintonpc added a commit to wintonpc/oj that referenced this pull request Aug 31, 2023
wintonpc added a commit to wintonpc/oj that referenced this pull request Aug 31, 2023
wintonpc added a commit to wintonpc/oj that referenced this pull request Aug 31, 2023
ohler55 pushed a commit that referenced this pull request Dec 4, 2023
* Don't assume xmlschema nanoseconds and don't fudge fractional seconds

* Remove unused defs from #810

* Fixed clang-format violations
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