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

truncate overflows when handling times in milliseconds #1079

Open
matsjoyce opened this issue Feb 19, 2020 · 1 comment
Open

truncate overflows when handling times in milliseconds #1079

matsjoyce opened this issue Feb 19, 2020 · 1 comment

Comments

@matsjoyce
Copy link

Same issue as #591 (tracked in #721). I am receiving a bunch of timestamps from an API as floating point seconds since the epoch. To process them I was doing:

Time.millisToPosix <| truncate <| t * 1000

which causes an overflow, giving times before 1970. Changing to:

Time.millisToPosix <| round <| t * 1000

fixed the issue, as would using ceiling. However, it would be nice if truncate could handle 64 bit floats without surprises.

@matsjoyce matsjoyce changed the title truncate overflows when handling time truncate overflows when handling times in milliseconds Feb 19, 2020
@github-actions
Copy link

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.
    Finally, please be patient with the core team. They are trying their best with limited resources.

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