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

Merge release 4.0.2 into 4.1.x #707

Merged
merged 4 commits into from Mar 19, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Release Notes for 4.0.2

This release fixes a specification compatibility issue by making sure we use floats to represent time fractions.

4.0.2

  • Total issues resolved: 0
  • Total pull requests resolved: 1
  • Total contributors: 1

Bug

lcobucci and others added 4 commits March 19, 2021 21:00
The RFC-7519 states that the `NumericDate` type is:

> JSON numeric value representing the number of seconds from
> 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring
> leap seconds.

Then also mentions that time fractions (as covered by RFC-3339) are supported:

> Seconds Since the Epoch", in which each day is accounted for by
> exactly 86400 seconds, other than that non-integer values can be
> represented.

While adding support for time fractions we've interpreted the
"non-integer" really as any "non-integer" value, and used strings to
guard against precision issues.

That causes issues, since a string isn't a "JSON numeric value"
according to the JSON specs.

We observed that the 6-digit precision is not lost when doing JSON
encode/decode operations, this applies that technique to make sure we
comply to the specs and have "rounding issues" when dealing with floats.
Fix usage of non JSON numeric values for time fractions (without having precision issues)
@lcobucci lcobucci self-assigned this Mar 19, 2021
@lcobucci lcobucci added the Bug label Mar 19, 2021
@lcobucci lcobucci added this to the 4.1.3 milestone Mar 19, 2021
@lcobucci lcobucci merged commit 1e66927 into 4.1.x Mar 19, 2021
@lcobucci lcobucci deleted the 4.0.x-merge-up-into-4.1.x_60550fb033e094.43133164 branch March 19, 2021 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants