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

RangeError in google.protobuf.Timestamp.fromDate() #22

Closed
timostamm opened this issue Nov 9, 2020 · 1 comment
Closed

RangeError in google.protobuf.Timestamp.fromDate() #22

timostamm opened this issue Nov 9, 2020 · 1 comment

Comments

@timostamm
Copy link
Owner

The custom fromDate method of the well-known type Timestamp throws a RangeError when the Date has non-zero milliseconds.

Occurs on Google Chrome, Version 68.0.4240.80 (x86_64), mac os.

Reproduction:

Timestamp.fromDate(new Date(2020, 0, 1, 12, 30, 59, 600))
          ^^^^^^^^
core.js:6241 ERROR RangeError: The number 1577878259.6 cannot be converted to a BigInt because it is not an integer
@timostamm
Copy link
Owner Author

Fixed in PR #23.

Backported to v1.x branch.

Released in v1.0.7.

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

No branches or pull requests

1 participant