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

[feature] Converstion of time to time unit like ms #32

Open
guillaumevauvert-datadome opened this issue Nov 10, 2021 · 4 comments
Open
Assignees
Labels
enhancement New feature or request stale

Comments

@guillaumevauvert-datadome

Is your feature request related to a problem?

I would like to convert time to any unit (ms) for instance.

Describe the solution you'd like

time + 1 hour to ms

Describe alternatives you've considered

None with this tool.

Additional context

Not needed.

@guillaumevauvert-datadome guillaumevauvert-datadome added the enhancement New feature or request label Nov 10, 2021
@guillaumevauvert-datadome guillaumevauvert-datadome changed the title [feature] [feature] Converstion of time to time unit like ms Nov 10, 2021
@tchar
Copy link
Owner

tchar commented Nov 23, 2021

Hello @guillaumevauvert-datadome,

I am trying to understand what is the feature request.

So let's assume that time is November 25, 2021 00:00 then time + 1 hour will give you November 25, 2021 01:00 right?
How do you want to convert this to miliseconds?

Is this a question to convert 1 hour to miliseconds or literaly convert November 25, 2021 01:00 to milliseconds. And if so what would that value be?

Cheers

  • tchar

@guillaumevauvert-datadome
Copy link
Author

Hello @tchar ,
As a software engineer, we often need to convert current date-time to number of millis since 1-1-1970.
https://currentmillis.com/ provides some explanations around that.
Regards

@tchar
Copy link
Owner

tchar commented Nov 24, 2021

Ah I see so you need the unix timestamp in whatever units.
Let me think if this is easy to implement.

The reason is because the time command does not use the converter (which uses pint) so it has to be implemented using text parsing or by calling the converted from within the Time Handler.

An easy solution could be to parse the query and if it is such a conversion.

  • Find the unix timestamp in seconds
  • Convert it to whatever time units

Generally these days I don't have much time, but I welcome anyone who wants to help implementing this.

@github-actions
Copy link

Issue has been marked as stale due to no activity

@github-actions github-actions bot added the stale label Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants