-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
date: implement --resolution #6143
Comments
i tried this command in debian(wsl) but got this instead |
@biplab5464 Strange, because it is documented: https://www.gnu.org/software/coreutils/manual/html_node/Options-for-date.html It was introduced in GNU coreutils 9.1. Maybe you have an older version? |
Hi, I tried to implement date --resolution but i am unable to find how to implement the logic for getting the resolution of the system. I went thought internet also the gnu coreutils but didn't got a constructive idea how to implement this logic. do you have some reference which can help me Thanks |
Stealing tert's summary of the sourcecode situation: Please don't look at or link the GNU source code. That policy is our guarantee that uutils is original code. The documentation fair game though. That said, if I knew how to get the resolution reliably and correctly, I probably would have already implemented it ^^' Thank you for investing the time, then I guess it's not easy, and shouldn't be marked as "good first issue", my bad. |
We can see what GNU does with strace though. There's probably a libc function for this somewhere. |
Hi, I'm taking a pass at this , I have the logic for
|
@biplab5464, Just to clarify when you say "the resolution of the system." Are you reffering to cpu architecture, operating system or both ? |
@Dj-Codeman Nice! The argument parsing is done with clap. You can look at the other flags to see how it's done. To answer your other question: whatever matches GNU! I guess that's the OS time resolution. |
@Dj-Codeman i learned that resolution is the lowest time measurable by the system. can you tell me where is the doc for TimeResolution::new() in rust. maybe i can help with argument passing. |
@biplab5464 Sorry my comment was written poorly. I'm adding this: |
This sounds like a feature that people probably use:
When you implement it, please make sure that you set
overrides_with
, so thatdate --resolution --resolution
also works :)Found while working on #6142
The text was updated successfully, but these errors were encountered: