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

Conversions from milliseconds are rounded #140

Open
gmattie opened this issue Jul 17, 2020 · 3 comments
Open

Conversions from milliseconds are rounded #140

gmattie opened this issue Jul 17, 2020 · 3 comments

Comments

@gmattie
Copy link

gmattie commented Jul 17, 2020

ms("2.5 hrs") // 9000000
ms("9000000") // 3h
ms("9000000", { long: true ) // 3 hours

The above code returns "3h" or "3 hours" when a total of 2.5 hrs in milliseconds is parsed.

If there are technical limitations to returning accurate string representations, it would be ideal to provide an example and explanation in the repository readme.md.

@ianmcderp
Copy link

This issue would be fixed by merging the CR from #125.

@david-gonzalez-pnw
Copy link

Bump on this!! This is a pretty decent bug. It caused us to loose a couple of hours troubleshooting our custom CI system where we couldn't figure out why calculated timeouts weren't being respected (things were timing out earlier).

> ms('1h')
3600000
> ms('73m')
4380000
> ms(4380000)
'1h'

@kud
Copy link

kud commented Sep 19, 2023

Yeah everything is rounded.

screenshot-2023-09-19-16-51-11

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

4 participants