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

touch -d"2022-05-15 +01 month" 01.ts isn't supported #3505

Open
sylvestre opened this issue May 8, 2022 · 4 comments
Open

touch -d"2022-05-15 +01 month" 01.ts isn't supported #3505

sylvestre opened this issue May 8, 2022 · 4 comments

Comments

@sylvestre
Copy link
Sponsor Contributor

Should return:

-rw-r--r-- 1 sylvestre sylvestre 0 15 juin   2022 01.ts

Currently fails with:

touch: Unable to parse date: 2022-05-15 +01 month

Used by gnu/tests/ls/abmon-align.sh

@dgunay
Copy link
Contributor

dgunay commented May 20, 2022

looking into this one

dgunay added a commit to dgunay/coreutils that referenced this issue May 20, 2022
dgunay added a commit to dgunay/coreutils that referenced this issue May 20, 2022
@tertsdiepraam
Copy link
Member

The full documentation on every format that GNU supports is here: https://www.gnu.org/software/coreutils/manual/html_node/Date-input-formats.html

In particular, the part that this issue is about is: https://www.gnu.org/software/coreutils/manual/html_node/Relative-items-in-date-strings.html

I suggest that we implement this in uucore (if we can't find an existing library) so that it can be used in multiple utils.

@sylvestre
Copy link
Sponsor Contributor Author

I suggest that we implement this in uucore (if we can't find an existing library) so that it can be used in multiple utils.

Or in a crate base on time or chrono which could be used by other projects too :)

@tertsdiepraam
Copy link
Member

Agreed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

4 participants