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

Timex.from_now rounds up to minute after 45 seconds #729

Open
jsmestad opened this issue Dec 15, 2022 · 0 comments
Open

Timex.from_now rounds up to minute after 45 seconds #729

jsmestad opened this issue Dec 15, 2022 · 0 comments

Comments

@jsmestad
Copy link
Contributor

Steps to reproduce

now = ~U[2022-12-15 03:59:00.529722Z]
expires_at = ~U[2022-12-15 03:59:45.529722Z]
Timex.from_now(expires_at, now)
    # => "in 45 seconds"

now = ~U[2022-12-15 03:59:00.529722Z]
expires_at = ~U[2022-12-15 03:59:46.529722Z]
Timex.from_now(expires_at, now)
    # => "in 1 minute"

Description of issue

  • What are the expected results?

    • Returns in 46 seconds
  • If you are certain this is a bug in Timex, do you have references I
    can use to check the algorithm/logic against? For instance, a well-established
    date/time library in another language, a paper, test suite, etc. It is by no
    means a requirement, but is immensely helpful in fixing bugs, and provides me
    extra data to use when building out the test suite

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